⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xueshengchaxun.java

📁 这是自己做的图书馆信息管理系统
💻 JAVA
字号:
package infomanagement;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2003</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import com.borland.dbswing.*;
import com.borland.dx.sql.dataset.*;
import com.borland.dx.dataset.*;
import java.awt.event.*;
import java.awt.Font;
import java.awt.BorderLayout;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author unascribed
 * @version 1.0
 */
public class xueshengchaxun extends JDialog {
  private JPanel jPanel1 = new JPanel();
  private XYLayout xYLayout1 = new XYLayout();
  private JLabel jLabel1 = new JLabel();
  private JLabel jLabel4 = new JLabel();
  private QueryDataSet queryDataSet1 = new QueryDataSet();
  private Database database1 = new Database();
  private QueryDataSet queryDataSet2 = new QueryDataSet();
  private Column column1 = new Column();
  JLabel jLabel2 = new JLabel();
  JRadioButton jRadioButton1 = new JRadioButton();
  JRadioButton jRadioButton2 = new JRadioButton();
  JRadioButton jRadioButton3 = new JRadioButton();
  public xueshengchaxun(Frame frame, String title, boolean modal) {
    super(frame, title, modal);
    try {
      jbInit();
      pack();
    }
    catch(Exception ex) {
      ex.printStackTrace();
    }
  }

  public xueshengchaxun() {
    this(null, "", false);
  }
  private void jbInit() throws Exception {
    jPanel1.setLayout(xYLayout1);
    jLabel1.setFont(new java.awt.Font("Dialog", 0, 23));
    jLabel1.setForeground(Color.magenta);
    jLabel1.setBorder(BorderFactory.createEtchedBorder());
    jLabel1.setText("                    学生查询");
    jLabel4.setBorder(BorderFactory.createEtchedBorder());
    database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor
                            ("jdbc:odbc:local", "sa", "", false,
                             "sun.jdbc.odbc.JdbcOdbcDriver"));
    column1.setColumnName("NewColumn1");
    column1.setDataType(com.borland.dx.dataset.Variant.STRING);
    column1.setPreferredOrdinal(0);
    column1.setServerColumnName("NewColumn1");
    column1.setSqlType(0);
    jLabel2.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
    jLabel2.setForeground(Color.red);
    jLabel2.setText("     请选择查询类型");
    jRadioButton1.setText("按姓名查询");
    jRadioButton1.addActionListener(new ActionListener()
       {
         public void actionPerformed(ActionEvent e)
         {
           abClicked(e);
         }
       } );

    jRadioButton2.setText("按学号查询");
    jRadioButton2.addActionListener(new ActionListener()
       {
         public void actionPerformed(ActionEvent e)
         {
           acClicked(e);
         }
       } );

    jRadioButton3.setText("全部");
    jRadioButton3.addActionListener(new ActionListener()
       {
         public void actionPerformed(ActionEvent e)
         {
           adClicked(e);
         }
       } );

    this.getContentPane().add(jPanel1, BorderLayout.CENTER);
    jPanel1.add(jLabel1, new XYConstraints(0, 1, 399, 53));
    jPanel1.add(jLabel2, new XYConstraints(81, 73, -1, -1));
    jPanel1.add(jRadioButton1, new XYConstraints(111, 126, -1, -1));
    jPanel1.add(jRadioButton3, new XYConstraints(113, 191, -1, -1));
    jPanel1.add(jLabel4, new XYConstraints(1, 97, 397, 202));
    jPanel1.add(jRadioButton2, new XYConstraints(112, 159, -1, -1));
  }

  void abClicked(ActionEvent e)
    {

      xueshengmingchaxun dlg=new xueshengmingchaxun();
      Dimension dlgSize = dlg.getPreferredSize();
      Dimension frmSize = getSize();
      Point loc = getLocation();
      dlg.setLocation((frmSize.width - dlgSize.width) / 2 +
                      loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
      dlg.setModal(true);
      dlg.pack();

      dlg.setVisible(true);
    }
    void acClicked(ActionEvent e)
    {
      xueshegnghaochaxun dlg=new xueshegnghaochaxun();
      Dimension dlgSize = dlg.getPreferredSize();
      Dimension frmSize = getSize();
      Point loc = getLocation();
      dlg.setLocation((frmSize.width - dlgSize.width) / 2 +
                      loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
      dlg.setModal(true);
      dlg.pack();

      dlg.setVisible(true);

    }
     void adClicked(ActionEvent e)
    {
      xianshichaxun1 dlg=new xianshichaxun1();
      Dimension dlgSize = dlg.getPreferredSize();
      Dimension frmSize = getSize();
      Point loc = getLocation();
      dlg.setLocation((frmSize.width - dlgSize.width) / 2 +
                      loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
      dlg.setModal(true);
      dlg.pack();

      dlg.setVisible(true);

    }

  void cancel()
  {
    dispose() ;
  }



}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -