📄 mainframe.java~679~
字号:
//显示弹出窗口的位置,现在在显示屏的中间
f.setLocation(154, 44);
f.setModal(true);
f.setDefaultCloseOperation(f.DISPOSE_ON_CLOSE);
f.setVisible(true);
}
public void jMenuItem13_actionPerformed(ActionEvent e) {
ChangePassFrame f = new ChangePassFrame(this.userName);
System.out.println(userName);
f.setSize(400, 320);
//显示弹出窗口的位置,现在在显示屏的中间
f.setLocation(154, 44);
f.setModal(true);
f.setDefaultCloseOperation(f.DISPOSE_ON_CLOSE);
f.setVisible(true);
}
public void jMenuItem2_actionPerformed(ActionEvent e) {
//管理员界面弹出的注册窗体
//实例化注册窗体
userLoginFrame f = new userLoginFrame();
f.setSize(428, 482);
//显示弹出窗口的位置,现在在显示屏的中间
f.setLocation(154, 44);
f.setDefaultCloseOperation(f.DISPOSE_ON_CLOSE);
f.setModal(true);
f.setVisible(true);
//this.dispose();
}
public void jMenuItem6_actionPerformed(ActionEvent e) {
this.dispose();
}
public void jMenuItem7_actionPerformed(ActionEvent e) {
// 学生登录后察看成绩界面
LookStudentExamInfoFrame f = new LookStudentExamInfoFrame();
f.setSize(440, 470);
//显示弹出窗口的位置,现在在显示屏的中间
f.setLocation(154, 44);
f.setModal(true);
f.setDefaultCloseOperation(f.DISPOSE_ON_CLOSE);
f.setVisible(true);
}
public void jMenuItem3_actionPerformed(ActionEvent e) {
TeacherInfoFrame tf = new TeacherInfoFrame();
tf.setSize(420, 390);
//显示弹出窗口的位置,现在在显示屏的中间
tf.setLocation(154, 44);
tf.setModal(true);
tf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
tf.setVisible(true);
}
public void jMenuItem9_actionPerformed(ActionEvent e) {
StudentInfoFrame studentinfoframe = new StudentInfoFrame();
studentinfoframe.setSize(488, 476);
//显示弹出窗口的位置,现在在显示屏的中间
studentinfoframe.setLocation(154, 44);
studentinfoframe.setDefaultCloseOperation(studentinfoframe.
DISPOSE_ON_CLOSE);
studentinfoframe.setVisible(true);
}
public void jMenuItem16_actionPerformed(ActionEvent e) {
//打开课程信息列表
CourseFrame af = new CourseFrame();
af.setSize(400, 400);
//显示弹出窗口的位置,现在在显示屏的中间
af.setLocation(154, 44);
af.setModal(true);
af.setDefaultCloseOperation(af.DISPOSE_ON_CLOSE);
af.setVisible(true);
}
public void jMenuItem1_actionPerformed(ActionEvent e) {
this.dispose();
}
public void jMenuItem10_actionPerformed(ActionEvent e) {
ClassInfoFrame c = new ClassInfoFrame();
c.setSize(500, 500);
//显示弹出窗口的位置,现在在显示屏的中间
c.setLocation(154, 44);
c.setModal(true);
c.setDefaultCloseOperation(c.DISPOSE_ON_CLOSE);
c.setVisible(true);
}
public void jMenuItem12_actionPerformed(ActionEvent e) {
ExamFrame ef = new ExamFrame();
ef.setSize(500, 550);
//显示弹出窗口的位置,现在在显示屏的中间
ef.setLocation(154, 44);
ef.setModal(true);
ef.setDefaultCloseOperation(ef.DISPOSE_ON_CLOSE);
ef.setVisible(true);
}
public void jMenuItem15_actionPerformed(ActionEvent e) {
aboutOurFrame a = new aboutOurFrame();
a.setSize(442, 411);
a.setLocation(154, 44);
a.setModal(true);
a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
a.setVisible(true);
}
public void jMenuItem5_actionPerformed(ActionEvent e) {
aboutOurFrame a = new aboutOurFrame();
a.setSize(442, 411);
a.setLocation(154, 44);
a.setModal(true);
a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
a.setVisible(true);
}
public void jMenuItem14_actionPerformed(ActionEvent e) {
aboutOurFrame a = new aboutOurFrame();
a.setSize(442, 411);
a.setLocation(154, 44);
a.setModal(true);
a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
a.setVisible(true);
}
public void run() {
while (true) {
Date d = new Date();
String s = d.toLocaleString();
this.lblTime.setText(s);
try {
Thread.sleep(1000);
} catch (InterruptedException ex) {
}
}
}
public void btnRLogin_actionPerformed(ActionEvent e) {
SystemEnterFrame systementerframe = new SystemEnterFrame();
systementerframe.setSize(423, 295);
//显示弹出窗口的位置,现在在显示屏的中间=
systementerframe.setLocation(300, 150);
systementerframe.setDefaultCloseOperation(systementerframe.
EXIT_ON_CLOSE);
systementerframe.setVisible(true);
this.dispose();
}
public void btnLookUserInfo_actionPerformed(ActionEvent e) {
this.panStu.setVisible(true);
fillUserTable();
this.btnCancelTable.setVisible(true);
// adminLookUserInfoFrame a = new adminLookUserInfoFrame();
// a.setSize(430, 400);
// a.setLocation(154, 44);
// a.setModal(true);
// a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
// a.setVisible(true);
}
public void jButton3_actionPerformed(ActionEvent e) {
this.panStu.setVisible(true);
fillTeacherTable();
this.btnCancelTable.setVisible(true);
// AdminLookTeacherFrame a = new AdminLookTeacherFrame();
// a.setSize(405, 350);
// a.setLocation(154, 44);
// a.setModal(true);
// a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
// a.setVisible(true);
}
public void btnCancelTow_actionPerformed(ActionEvent e) {
this.dispose();
}
public void btnLookStudent_actionPerformed(ActionEvent e) {
//429 345
this.panStu.setVisible(true);
fillStudentsTable();
this.btnCancelTable.setVisible(true);
// adminLookStudentFrame a = new adminLookStudentFrame();
// a.setSize(435, 370);
// a.setLocation(154, 44);
// a.setModal(true);
// a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
// a.setVisible(true);
}
public void btnAbout_actionPerformed(ActionEvent e) {
//431411
this.lblAboutOur.setVisible(true);
this.lbl1.setVisible(true);
this.lbl2.setVisible(true);
this.lbl3.setVisible(true);
this.lbl4.setVisible(true);
this.lbl5.setVisible(true);
this.lbl6.setVisible(true);
this.lbl7.setVisible(true);
this.lbl8.setVisible(true);
this.lbl9.setVisible(true);
this.lbl10.setVisible(true);
this.lbl11.setVisible(true);
this.btnCancelAbout.setVisible(true);
this.lblAboutOurImg.setVisible(true);
// this.lbl1.setVisible(true);
// this.lbl2.setVisible(true);
// aboutOurFrame a = new aboutOurFrame();
// a.setSize(442, 420);
// a.setLocation(154, 44);
// a.setModal(true);
// a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
// a.setVisible(true);
}
public void jMenuItem11_actionPerformed(ActionEvent e) {
aboutOurFrame a = new aboutOurFrame();
a.setSize(442, 420);
a.setLocation(154, 44);
a.setModal(true);
a.setDefaultCloseOperation(a.DISPOSE_ON_CLOSE);
a.setVisible(true);
}
public void btnUpdateImg_actionPerformed(ActionEvent e) {
this.btnImg1.setVisible(true);
this.btnImg2.setVisible(true);
this.btnImg3.setVisible(true);
}
public void btnImg1_actionPerformed(ActionEvent e) {
ImageIcon i = new ImageIcon("F:/雪景.jpg");
this.lblP.setIcon(i);
this.btnImg1.setVisible(false);
this.btnImg2.setVisible(false);
this.btnImg3.setVisible(false);
}
public void btnImg2_actionPerformed(ActionEvent e) {
ImageIcon i = new ImageIcon("F:/小草.jpg");
this.lblP.setIcon(i);
this.btnImg1.setVisible(false);
this.btnImg2.setVisible(false);
this.btnImg3.setVisible(false);
}
public void btnImg3_actionPerformed(ActionEvent e) {
ImageIcon i = new ImageIcon("F:/城市.jpg");
this.lblP.setIcon(i);
this.btnImg1.setVisible(false);
this.btnImg2.setVisible(false);
this.btnImg3.setVisible(false);
}
public void btnCancelTable_actionPerformed(ActionEvent e) {
this.panStu.setVisible(false);
this.btnCancelTable.setVisible(false);
}
public void btnCancelOk_actionPerformed(ActionEvent e) {
this.dispose();
}
public void btnCancelAbout_actionPerformed(ActionEvent e) {
this.lblAboutOur.setVisible(false);
this.lbl1.setVisible(false);
this.lbl2.setVisible(false);
this.lbl3.setVisible(false);
this.lbl4.setVisible(false);
this.lbl5.setVisible(false);
this.lbl6.setVisible(false);
this.lbl7.setVisible(false);
this.lbl8.setVisible(false);
this.lbl9.setVisible(false);
this.lbl10.setVisible(false);
this.lbl11.setVisible(false);
this.btnCancelAbout.setVisible(false);
this.lblAboutOurImg.setVisible(false);
}
}
class MainFrame_btnCancelAbout_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_btnCancelAbout_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.btnCancelAbout_actionPerformed(e);
}
}
class MainFrame_btnCancelOk_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_btnCancelOk_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.btnCancelOk_actionPerformed(e);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -