📄 mainframe.java
字号:
package cn.com.edu.gui.view;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Window;
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Iterator;
import javax.swing.ButtonGroup;
import javax.swing.JComboBox;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JOptionPane;
import javax.swing.JToolBar;
import javax.swing.JButton;
import javax.swing.JMenuItem;
import javax.swing.JTree;
import javax.swing.JTabbedPane;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;
import javax.swing.JTable;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.ImageIcon;
import cn.com.edu.gui.contral.*;
public class MainFrame extends JFrame {
private static MainFrame mainFrame;
private JPanel jContentPane = null;
private JMenuBar jJMenuBar = null;
private JMenu jMenu = null;
private JMenu jMenu1 = null;
private JMenu jMenu2 = null;
private JMenu jMenu3 = null;
private JMenu jMenu4 = null;
private JMenu jMenu6 = null;
private JToolBar jJToolBarBar = null;
private JButton jButton = null;
private JButton jButton1 = null;
private JButton jButton2 = null;
private JButton jButton3 = null;
private JButton jButton4 = null;
private JButton jButton5 = null;
private JButton jButton6 = null;
private JButton jButton7 = null;
private JMenuItem jMenuItem = null;
private JMenuItem jMenuItem1 = null;
private JMenuItem jMenuItem2 = null;
private JMenuItem jMenuItem3 = null;
private JMenuItem jMenuItem4 = null;
private JMenuItem jMenuItem5 = null;
private JMenuItem jMenuItem6 = null;
private JMenuItem jMenuItem7 = null;
private JMenuItem jMenuItem8 = null;
private JMenuItem jMenuItem9 = null;
private JMenuItem jMenuItem10 = null;
private JMenuItem jMenuItem12 = null;
private JMenuItem jMenuItem13 = null;
private JMenuItem jMenuItem14 = null;
private JMenuItem jMenuItem20 = null;
private JMenuItem jMenuItem21 = null;
private JMenuItem jMenuItem22 = null;
private JPanel jPanel = null;
private JTree jTree = null;
private JPanel jPanel1 = null;
private JPanel jPanel2 = null;
private JTabbedPane jTabbedPane = null;
private JPanel jPanel7 = null;
private JPanel jPanel8 = null;
private JPanel jPanel9 = null;
private JLabel jLabel = null;
private JLabel jLabel1 = null;
private JLabel jLabel2 = null;
private JTextField jTextField = null;
private JPasswordField jPasswordField = null;
private JLabel jLabel4 = null;
private JTextField jTextField2 = null;
private JLabel jLabel5 = null;
private JTextField jTextField3 = null;
private JLabel jLabel6 = null;
private JRadioButton jRadioButton = null;
private JRadioButton jRadioButton1 = null;
private JLabel jLabel7 = null;
private JTextField jTextField4 = null;
private JLabel jLabel8 = null;
private JTextField jTextField5 = null;
private JTextField jTextField6 = null;
private JLabel jLabel9 = null;
private JLabel jLabel10 = null;
private JComboBox jComboBox = null;
private JLabel jLabel11 = null;
private JComboBox jComboBox1 = null;
private JLabel jLabel12 = null;
private JTextField jTextField7 = null;
private JLabel jLabel13 = null;
private JTextField jTextField8 = null;
private JLabel jLabel14 = null;
private JTextField jTextField9 = null;
private JButton jButton9 = null;
private JButton jButton10 = null;
private JButton jButton11 = null;
private JLabel jLabel15 = null;
private JLabel jLabel16 = null;
private JTextField jTextField10 = null;
private JLabel jLabel17 = null;
private JPasswordField jPasswordField1 = null;
private JButton jButton12 = null;
private JButton jButton13 = null;
private JButton jButton14 = null;
private JLabel jLabel19 = null;
private JLabel jLabel20 = null;
private JTextField jTextField12 = null;
private JLabel jLabel21 = null;
private JTextField jTextField13 = null;
private JLabel jLabel22 = null;
private JRadioButton jRadioButton2 = null;
private JRadioButton jRadioButton3 = null;
private JLabel jLabel23 = null;
private JTextField jTextField14 = null;
private JLabel jLabel24 = null;
private JTextField jTextField15 = null;
private JLabel jLabel25 = null;
private JTextField jTextField16 = null;
private JLabel jLabel26 = null;
private JComboBox jComboBox2 = null;
private JLabel jLabel27 = null;
private JComboBox jComboBox3 = null;
private JLabel jLabel28 = null;
private JTextField jTextField17 = null;
private JLabel jLabel29 = null;
private JTextField jTextField18 = null;
private JLabel jLabel30 = null;
private JTextField jTextField19 = null;
private JButton jButton15 = null;
private JButton jButton16 = null;
private JPanel jPanel3 = null;
private JTabbedPane jTabbedPane1 = null;
private JPanel jPanel4 = null;
private JPanel jPanel5 = null;
private JPanel jPanel6 = null;
private JLabel jLabel31 = null;
private JLabel jLabel32 = null;
private JTextField jTextField20 = null;
private JLabel jLabel33 = null;
private JTextField jTextField21 = null;
private JLabel jLabel34 = null;
private JTextField jTextField22 = null;
private JLabel jLabel35 = null;
private JTextField jTextField23 = null;
private JLabel jLabel36 = null;
private JTextField jTextField24 = null;
private JLabel jLabel37 = null;
private JTextField jTextField25 = null;
private JLabel jLabel38 = null;
private JTextField jTextField26 = null;
private JButton jButton17 = null;
private JButton jButton18 = null;
private JButton jButton19 = null;
private JLabel jLabel39 = null;
private JLabel jLabel40 = null;
private JComboBox jComboBox4 = null;
private JButton jButton20 = null;
private JButton jButton21 = null;
private JLabel jLabel41 = null;
private JLabel jLabel42 = null;
private JTextField jTextField27 = null;
private JLabel jLabel43 = null;
private JTextField jTextField28 = null;
private JLabel jLabel44 = null;
private JTextField jTextField29 = null;
private JLabel jLabel45 = null;
private JTextField jTextField30 = null;
private JLabel jLabel46 = null;
private JTextField jTextField31 = null;
private JLabel jLabel47 = null;
private JTextField jTextField32 = null;
private JLabel jLabel48 = null;
private JTextField jTextField33 = null;
private JButton jButton22 = null;
private JButton jButton23 = null;
private JPanel jPanel10 = null;
private JTabbedPane jTabbedPane2 = null;
private JPanel jPanel11 = null;
private JPanel jPanel12 = null;
private JLabel jLabel49 = null;
private JLabel jLabel50 = null;
private JTextField jTextField34 = null;
private JLabel jLabel51 = null;
private JComboBox jComboBox5 = null;
private JButton jButton24 = null;
private JButton jButton25 = null;
private JLabel jLabel52 = null;
private JLabel jLabel53 = null;
private JTextField jTextField35 = null;
private JLabel jLabel54 = null;
private JPasswordField jPasswordField2 = null;
private JLabel jLabel56 = null;
private JPasswordField jPasswordField4 = null;
private JButton jButton26 = null;
private JButton jButton27 = null;
private JButton jButton28 = null;
private JPanel jPanel13 = null;
private JTabbedPane jTabbedPane3 = null;
private JPanel jPanel14 = null;
private JPanel jPanel15 = null;
private JPanel jPanel16 = null;
private JLabel jLabel58 = null;
private JLabel jLabel59 = null;
private JLabel jLabel60 = null;
private JComboBox jComboBox6 = null;
private JLabel jLabel61 = null;
private JComboBox jComboBox7 = null;
private JLabel jLabel62 = null;
private JTextField jTextField37 = null;
private JButton jButton29 = null;
private JButton jButton30 = null;
private JScrollPane jScrollPane = null;
private JTable jTable = null;
private JLabel jLabel63 = null;
private JLabel jLabel64 = null;
private JLabel jLabel65 = null;
private JTextField jTextField38 = null;
private JLabel jLabel66 = null;
private JComboBox jComboBox8 = null;
private JLabel jLabel67 = null;
private JTextField jTextField39 = null;
private JButton jButton31 = null;
private JButton jButton32 = null;
private JLabel jLabel68 = null;
private JLabel jLabel70 = null;
private JTextField jTextField40 = null;
private JMenuItem jMenuItem16 = null;
private JButton jButton33 = null;
private JPanel jPanel17 = null;
private JTabbedPane jTabbedPane4 = null;
private JPanel jPanel18 = null;
private JPanel jPanel20 = null;
private JPanel jPanel21 = null;
private JPanel jPanel24 = null;
private JLabel jLabel69 = null;
private JLabel jLabel71 = null;
private JLabel jLabel74 = null;
private JTextField jTextField42 = null;
private JLabel jLabel75 = null;
private JTextField jTextField43 = null;
private JButton jButton34 = null;
private JButton jButton35 = null;
private JButton jButton36 = null;
private JPanel jPanel19 = null;
private JMenuItem jMenuItem17 = null;
private JLabel jLabel72 = null;
private JLabel jLabel78 = null;
private JComboBox jComboBox9 = null;
private JLabel jLabel79 = null;
private JTextField jTextField46 = null;
private JLabel jLabel80 = null;
private JTextField jTextField47 = null;
private JLabel jLabel81 = null;
private JTextField jTextField48 = null;
private JLabel jLabel82 = null;
private JTextField jTextField49 = null;
private JLabel jLabel83 = null;
private JTextField jTextField50 = null;
private JButton jButton37 = null;
private JButton jButton38 = null;
private JButton jButton39 = null;
private JLabel jLabel84 = null;
private JLabel jLabel85 = null;
private JComboBox jComboBox10 = null;
private JLabel jLabel86 = null;
private JTextArea jTextArea1 = null;
private JButton jButton40 = null;
private JButton jButton41 = null;
private JButton jButton42 = null;
private JLabel jLabel87 = null;
private JLabel jLabel88 = null;
private JComboBox jComboBox11 = null;
private JLabel jLabel89 = null;
private JTextField jTextField51 = null;
private JLabel jLabel90 = null;
private JTextField jTextField52 = null;
private JLabel jLabel91 = null;
private JComboBox jComboBox12 = null;
private JLabel jLabel92 = null;
private JTextField jTextField53 = null;
private JButton jButton43 = null;
private JButton jButton44 = null;
private JButton jButton45 = null;
private JLabel jLabel93 = null;
private JLabel jLabel94 = null;
private JComboBox jComboBox13 = null;
private JLabel jLabel95 = null;
private JTextField jTextField54 = null;
private JLabel jLabel96 = null;
private JTextArea jTextArea2 = null;
private JComboBox jComboBox14 = null;
private JLabel jLabel73 = null;
private JTextField jTextField41 = null;
private JLabel jLabel76 = null;
private JTextField jTextField44 = null;
private JLabel jLabel77 = null;
private JTextField jTextField45 = null;
private JButton jButton46 = null;
private JButton jButton47 = null;
private JButton jButton48 = null;
private JScrollPane jScrollPane1 = null;
private JTable jTable1 = null;
private JScrollPane jScrollPane2 = null;
private JTable jTable2 = null;
String strRadio = "";
private MainFrame() {
super();
initialize();
}
private void initialize() {
this.setSize(800, 600);
this.setJMenuBar(getJJMenuBar());
this.setContentPane(getJContentPane());
this.setTitle("湖南科技大学社团管理系统");
this.setResizable(false);
// this.centerwindow(getMainFrame());
}
public static MainFrame getMainFrame(){
if(mainFrame == null){
mainFrame = new MainFrame();
}
return mainFrame;
}
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJJToolBarBar(), null);
jContentPane.add(getJPanel(), null);
jContentPane.add(getJPanel2(), null);
jContentPane.add(getJPanel3(), null);
jContentPane.add(getJPanel10(), null);
jContentPane.add(getJPanel13(), null);
jContentPane.add(getJPanel17(), null);
}
return jContentPane;
}
private JMenuBar getJJMenuBar() {
if (jJMenuBar == null) {
jJMenuBar = new JMenuBar();
jJMenuBar.setPreferredSize(new java.awt.Dimension(0,25));
jJMenuBar.add(getJMenu());
jJMenuBar.add(getJMenu1());
jJMenuBar.add(getJMenu2());
jJMenuBar.add(getJMenu3());
jJMenuBar.add(getJMenu4());
jJMenuBar.add(getJMenu6());
}
return jJMenuBar;
}
private JMenu getJMenu() {
if (jMenu == null) {
jMenu = new JMenu();
jMenu.setText("社团管理(U)");
jMenu.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12));
jMenu.add(getJMenuItem());
jMenu.add(getJMenuItem1());
jMenu.add(getJMenuItem2());
}
return jMenu;
}
private JMenu getJMenu1() {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -