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

📄 searchpanel.java~8~

📁 银行信用评估系统
💻 JAVA~8~
字号:
package management;import java.awt.*;import javax.swing.*;import com.borland.dbswing.*;import java.awt.event.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class searchPanel extends JPanel {  JLabel jLabel2 = new JLabel();  JLabel jLabel3 = new JLabel();  JLabel jLabel4 = new JLabel();  JTextField jTextField1 = new JTextField();  JButton jButton1 = new JButton();  JButton jButton2 = new JButton();  JComboBox jComboBox1 = new JComboBox();  JComboBox jComboBox2 = new JComboBox();  TableScrollPane tableScrollPane1 = new TableScrollPane();  JdbTable jdbTable1 = new JdbTable();  GridBagLayout gridBagLayout1 = new GridBagLayout();  JLabel jLabel5 = new JLabel();  public searchPanel() {    try {      jbInit();    }    catch(Exception ex) {      ex.printStackTrace();    }  }  void jbInit() throws Exception {    this.setBackground(new Color(131, 223, 227));    this.setForeground(new Color(83, 62, 159));    this.setLayout(gridBagLayout1);    jLabel2.setFont(new java.awt.Font("Dialog", 1, 19));    jLabel2.setText("选择查询的表:");    jLabel3.setFont(new java.awt.Font("Dialog", 1, 19));    jLabel3.setText("选择查询的项:");    jLabel4.setFont(new java.awt.Font("Dialog", 1, 19));    jLabel4.setText("选择查询的内容:");    jTextField1.setText("");    jButton1.setText("确定");    jButton2.setText("重置");    jComboBox1.setSelectedItem(null);    jComboBox1.addItemListener(new searchPanel_jComboBox1_itemAdapter(this));    jLabel5.setFont(new java.awt.Font("Dialog", 1, 40));    jLabel5.setForeground(Color.magenta);    jLabel5.setText("  学 生 查 询 管 理");    this.add(jLabel3,    new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 15, 0, 9), 9, -1));    this.add(jLabel2,    new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(6, 16, 0, 11), 6, -2));    this.add(jLabel4,    new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 12, 0, 0), 1, -9));    this.add(jTextField1,    new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(8, 0, 0, 0), 107, 0));    this.add(jButton1,    new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(7, 13, 0, 0), -1, 0));    this.add(jButton2,    new GridBagConstraints(3, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(7, 17, 0, 14), -1, 0));    this.add(jComboBox1,    new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(7, 0, 0, 0), 157, 0));    this.add(jComboBox2,    new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(9, 0, 0, 0), 157, 0));    this.add(tableScrollPane1,    new GridBagConstraints(0, 4, 4, 1, 1.0, 1.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(24, 1, 6, 0), -27, -293));    this.add(jLabel5,              new GridBagConstraints(0, 0, 4, 1, 0.0, 0.0            ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 38, 19, 0), 161, -10));    tableScrollPane1.getViewport().add(jdbTable1, null);    jComboBox1.addItem("学生个人信息表");    jComboBox1.addItem("学生课程表");    jComboBox1.addItem("学生成绩表");  }  void jComboBox1_itemStateChanged(ItemEvent e) {    if(jComboBox1.getSelectedIndex()==0)    {   jComboBox2.removeAllItems();        jComboBox2.addItem("学号");        jComboBox2.addItem("姓名");        jComboBox2.addItem("年龄");        jComboBox2.addItem("性别");        jComboBox2.addItem("民族");        jComboBox2.addItem("专业");    }    else if(jComboBox1.getSelectedIndex()==1)   {   jComboBox2.removeAllItems();       jComboBox2.addItem("学号");       jComboBox2.addItem("课程名称");       jComboBox2.addItem("课程类型");       jComboBox2.addItem("任课老师");       jComboBox2.addItem("上课时间");       jComboBox2.addItem("上课地点");       jComboBox2.addItem("上课周次");    }    else if(jComboBox1.getSelectedIndex()==2)   {   jComboBox2.removeAllItems();       jComboBox2.addItem("学号");       jComboBox2.addItem("课程名称");       jComboBox2.addItem("成绩");       jComboBox2.addItem("学分");       jComboBox2.addItem("类别");       jComboBox2.addItem("考别");       jComboBox2.addItem("备注");       jComboBox2.addItem("时间");    }  }}class searchPanel_jComboBox1_itemAdapter implements java.awt.event.ItemListener {  searchPanel adaptee;  searchPanel_jComboBox1_itemAdapter(searchPanel adaptee) {    this.adaptee = adaptee;  }  public void itemStateChanged(ItemEvent e) {    adaptee.jComboBox1_itemStateChanged(e);  }}

⌨️ 快捷键说明

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