📄 base_dialog.java
字号:
package student;import java.awt.*;import javax.swing.*;import com.borland.jbcl.layout.*;import java.awt.event.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class Base_Dialog extends JDialog { JPanel panel1 = new JPanel(); JButton jButton1 = new JButton(); JButton jButton2 = new JButton(); JButton jButton3 = new JButton(); JPanel jPanel1 = new JPanel(); XYLayout xYLayout2 = new XYLayout(); JLabel jLabel1 = new JLabel(); JPanel jPanel2 = new JPanel(); JButton jButton4 = new JButton(); JButton jButton5 = new JButton(); JLabel jLabel2 = new JLabel(); XYLayout xYLayout3 = new XYLayout(); JButton jButton6 = new JButton(); JButton jButton7 = new JButton(); GridBagLayout gridBagLayout1 = new GridBagLayout(); public Base_Dialog(Frame frame, String title, boolean modal) { super(frame, title, modal); try { jbInit(); pack(); } catch(Exception ex) { ex.printStackTrace(); } } public Base_Dialog() { this(null, "", false); } private void jbInit() throws Exception { panel1.setLayout(gridBagLayout1); jButton1.setFont(new java.awt.Font("DialogInput", 0, 12)); jButton1.setText("院系设置"); jButton1.addActionListener(new Base_Dialog_jButton1_actionAdapter(this)); jButton2.setText("专业设置"); jButton2.addActionListener(new Base_Dialog_jButton2_actionAdapter(this)); jButton2.setFont(new java.awt.Font("DialogInput", 0, 12)); jButton3.setText("班级设置"); jButton3.addActionListener(new Base_Dialog_jButton3_actionAdapter(this)); jButton3.setFont(new java.awt.Font("DialogInput", 0, 12)); jPanel1.setBorder(BorderFactory.createEtchedBorder()); jPanel1.setLayout(xYLayout2); jLabel1.setFont(new java.awt.Font("DialogInput", 0, 12)); jLabel1.setText("学校基本资料设置"); jPanel2.setLayout(xYLayout3); jPanel2.setBorder(BorderFactory.createEtchedBorder()); jButton4.setText("考试科目设置"); jButton4.addActionListener(new Base_Dialog_jButton4_actionAdapter(this)); jButton4.setFont(new java.awt.Font("DialogInput", 0, 12)); jButton5.setFont(new java.awt.Font("DialogInput", 0, 12)); jButton5.setText("考试类型设置"); jButton5.addActionListener(new Base_Dialog_jButton5_actionAdapter(this)); jLabel2.setFont(new java.awt.Font("DialogInput", 0, 12)); jLabel2.setText("考试基本资料设置"); jButton6.setText("考试学期设置"); jButton6.addActionListener(new Base_Dialog_jButton6_actionAdapter(this)); jButton6.setFont(new java.awt.Font("DialogInput", 0, 12)); jButton7.setFont(new java.awt.Font("DialogInput", 0, 12)); jButton7.setText("返回"); jButton7.addActionListener(new Base_Dialog_jButton7_actionAdapter(this)); this.setResizable(false); this.setTitle("基本资料管理"); getContentPane().add(panel1); jPanel1.add(jButton3, new XYConstraints(20, 154, 114, -1)); jPanel1.add(jButton2, new XYConstraints(18, 103, 114, -1)); jPanel1.add(jButton1, new XYConstraints(20, 48, 114, -1)); jPanel1.add(jLabel1, new XYConstraints(25, 15, 108, -1)); panel1.add(jPanel2, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0 ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(25, 29, 0, 37), 14, 26)); jPanel2.add(jButton6, new XYConstraints(20, 154, 114, -1)); jPanel2.add(jButton5, new XYConstraints(20, 48, 114, -1)); jPanel2.add(jLabel2, new XYConstraints(25, 15, 108, -1)); jPanel2.add(jButton4, new XYConstraints(20, 103, 114, -1)); panel1.add(jButton7, new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(18, 155, 19, 161), 26, 0)); panel1.add(jPanel1, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0 ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(25, 30, 0, 0), 14, 26)); } void jButton7_actionPerformed(ActionEvent e) { this.dispose(); } void jButton1_actionPerformed(ActionEvent e) { Department_Dialog dlg = new Department_Dialog(); 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.show(); } void jButton2_actionPerformed(ActionEvent e) { Major_Dialog dlg = new Major_Dialog(); 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.show(); } void jButton3_actionPerformed(ActionEvent e) { Class_Dialog dlg = new Class_Dialog(); 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.show(); } void jButton5_actionPerformed(ActionEvent e) { ExamType_Dialog dlg = new ExamType_Dialog(); 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.show(); } void jButton4_actionPerformed(ActionEvent e) { ExamSubject_Dialog dlg = new ExamSubject_Dialog(); 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.show(); } void jButton6_actionPerformed(ActionEvent e) { ExamTime_Dialog dlg = new ExamTime_Dialog(); 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.show(); }}class Base_Dialog_jButton7_actionAdapter implements java.awt.event.ActionListener { Base_Dialog adaptee; Base_Dialog_jButton7_actionAdapter(Base_Dialog adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton7_actionPerformed(e); }}class Base_Dialog_jButton1_actionAdapter implements java.awt.event.ActionListener { Base_Dialog adaptee; Base_Dialog_jButton1_actionAdapter(Base_Dialog adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton1_actionPerformed(e); }}class Base_Dialog_jButton2_actionAdapter implements java.awt.event.ActionListener { Base_Dialog adaptee; Base_Dialog_jButton2_actionAdapter(Base_Dialog adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton2_actionPerformed(e); }}class Base_Dialog_jButton3_actionAdapter implements java.awt.event.ActionListener { Base_Dialog adaptee; Base_Dialog_jButton3_actionAdapter(Base_Dialog adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton3_actionPerformed(e); }}class Base_Dialog_jButton5_actionAdapter implements java.awt.event.ActionListener { Base_Dialog adaptee; Base_Dialog_jButton5_actionAdapter(Base_Dialog adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton5_actionPerformed(e); }}class Base_Dialog_jButton4_actionAdapter implements java.awt.event.ActionListener { Base_Dialog adaptee; Base_Dialog_jButton4_actionAdapter(Base_Dialog adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton4_actionPerformed(e); }}class Base_Dialog_jButton6_actionAdapter implements java.awt.event.ActionListener { Base_Dialog adaptee; Base_Dialog_jButton6_actionAdapter(Base_Dialog adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton6_actionPerformed(e); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -