📄 studentq.java~6~
字号:
package xiangmu;
import java.awt.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.Rectangle;
import java.awt.Font;
import javax.swing.border.EtchedBorder;
import javax.swing.border.Border;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* <p>Title: 第四学习小组-教学管理系统</p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2008</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class StudentQ extends JFrame {
String cols[]={"班级编号"," 学 号"," 姓 名"," 性 别"," 身份证","出生日期","家庭住址","联系方式","毕业学校"," 学 历","入学学期","入学日期"," 证 书"," 状 态"," 备 注"};
DefaultTableModel bg=new DefaultTableModel(cols,0);
public StudentQ() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(null);
jButton1.setBounds(new Rectangle(475, 7, 90, 33));
jButton1.setFont(new java.awt.Font("宋体", Font.BOLD, 12));
jButton1.setText("查 询");
jButton1.addActionListener(new StudentQ_jButton1_actionAdapter(this));
jComboBox2.setBounds(new Rectangle(212, 7, 90, 33));
jLabel2.setFont(new java.awt.Font("宋体", Font.BOLD, 12));
jLabel2.setText("所属班级:");
jLabel2.setBounds(new Rectangle(150, 18, 67, 15));
jScrollPane1.setBorder(border1);
jScrollPane1.setBounds(new Rectangle(8, 46, 790, 402));
jLabel1.setFont(new java.awt.Font("宋体", Font.BOLD, 12));
jLabel1.setText("学员编号:");
jLabel1.setBounds(new Rectangle(309, 12, 76, 22));
jComboBox1.setBounds(new Rectangle(374, 7, 91, 33));
jButton2.addActionListener(new StudentQ_jButton2_actionAdapter(this));
this.getContentPane().add(jScrollPane1);
this.getContentPane().add(jLabel2);
this.getContentPane().add(jComboBox2);
this.getContentPane().add(jButton2);
this.getContentPane().add(jButton1);
this.getContentPane().add(jComboBox1);
this.getContentPane().add(jLabel1);
jScrollPane1.getViewport().add(jTable1);
jButton2.setBounds(new Rectangle(573, 7, 90, 33));
jButton2.setFont(new java.awt.Font("宋体", Font.BOLD, 12));
jButton2.setText("退 出");
jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.
VERTICAL_SCROLLBAR_ALWAYS);
}
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
JLabel jLabel2 = new JLabel();
JComboBox jComboBox2 = new JComboBox();
JScrollPane jScrollPane1 = new JScrollPane();
JTable jTable1 = new JTable(bg);
Border border1 = BorderFactory.createEtchedBorder(EtchedBorder.RAISED,
Color.white, new Color(170, 170, 170));
JLabel jLabel1 = new JLabel();
JComboBox jComboBox1 = new JComboBox();
public void jButton2_actionPerformed(ActionEvent e) {
this.dispose();
}
public void jButton1_actionPerformed(ActionEvent e) {
}
}
class StudentQ_jButton1_actionAdapter implements ActionListener {
private StudentQ adaptee;
StudentQ_jButton1_actionAdapter(StudentQ adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
class StudentQ_jButton2_actionAdapter implements ActionListener {
private StudentQ adaptee;
StudentQ_jButton2_actionAdapter(StudentQ adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -