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

📄 mainframe.java

📁 一个个人信息管理系统
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package soft1;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.Rectangle;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.BorderFactory;
import java.awt.Color;
import javax.swing.border.TitledBorder;
import java.awt.Dimension;
import java.util.Date;
import java.text.SimpleDateFormat;
import soft1Method.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.awt.Font;
import javax.swing.border.Border;
import javax.swing.border.MatteBorder;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class MainFrame extends JFrame {
    JPanel contentPane;
    JButton RCGZ = new JButton();
    JButton TXB = new JButton();
    JButton MMBW = new JButton();
    JButton SHSS = new JButton();
    JButton YHGL = new JButton();
    JButton HELP = new JButton();
    JButton ZX = new JButton();
    public JSplitPane jSplitPane1 = new JSplitPane();
    TitledBorder titledBorder1 = new TitledBorder("");
    TitledBorder titledBorder2 = new TitledBorder("");
    JPanel jPanel2 = new JPanel();
    XYLayout xYLayout1 = new XYLayout();
    JButton jButton1 = new JButton();
    JPanel jPanel1 = new JPanel();
    JButton jButton2 = new JButton();
    Login login=new Login();
    public JLabel jLabel2 = new JLabel();
    JLabel jLabel1 = new JLabel();
    BG jPanel3 = new BG();
    Icon img2= new  ImageIcon("src/Pic/MainPic.PNG");
    Icon img3= new  ImageIcon("src/Pic/r1.PNG");
    Icon img5= new  ImageIcon("src/Pic/s1.PNG");
    Icon img7= new  ImageIcon("src/Pic/t1.PNG");
    Icon img9= new  ImageIcon("src/Pic/m1.PNG");
    Icon img11= new  ImageIcon("src/Pic/g1.PNG");
    Icon img12= new  ImageIcon("src/Pic/g2.PNG");
    Icon img13= new  ImageIcon("src/Pic/zx.PNG");
    Icon img14= new  ImageIcon("src/Pic/b.PNG");
    GetValue gv=new GetValue();
    Login lg=new Login();
    MiddleLoc ml=new MiddleLoc();
    Dataset2 dt=new Dataset2();
    JLabel jLabel3 = new JLabel();
    Icon imgSearch= new   ImageIcon("src/Pic/s.PNG");
    JLabel jLabel4 = new JLabel();
    JLabel jLabel5 = new JLabel();
    JLabel jLabel6 = new JLabel();
    JLabel jLabel7 = new JLabel();
    JLabel jLabel8 = new JLabel();
    JLabel jLabel9 = new JLabel();
    JLabel jLabel10 = new JLabel();
    JLabel jLabel11 = new JLabel();
    JLabel jLabel12 = new JLabel();
    JLabel jLabel13 = new JLabel();
    JLabel jLabel14 = new JLabel();
    JLabel jLabel15 = new JLabel();
    JLabel jLabel16 = new JLabel();
    JLabel jLabel17 = new JLabel();
    JLabel jLabel18 = new JLabel();
    JLabel jLabel19 = new JLabel();
    JLabel jLabel20 = new JLabel();
    JLabel jLabel21 = new JLabel();
    JLabel jLabel22 = new JLabel();
    TitledBorder titledBorder3 = new TitledBorder("");
    TitledBorder titledBorder4 = new TitledBorder("");
    TitledBorder titledBorder5 = new TitledBorder("");
    Border border1 = BorderFactory.createEmptyBorder();
    JLabel jLabel23 = new JLabel();
    JLabel jLabel24 = new JLabel();
    Search sc =new Search();
    JButton jButton3 = new JButton();
    JLabel jLabel25 = new JLabel();

    public MainFrame() {
        try {
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    class BG extends JPanel {

               public void paintComponent(Graphics g) {
                       super.paintComponent(g);
                       Toolkit toolImg = this.getToolkit();
                       Image img = toolImg.getImage("src/Pic/MainPic.PNG");
                       g.drawImage(img,0,0,this.getSize().width,this.getSize().height,this);
               }
            }

    /**
     * Component initialization.
     *
     * @throws java.lang.Exception
     */
    private void jbInit() throws Exception {
        border1 = new MatteBorder(null);
        contentPane = (JPanel) getContentPane();
        contentPane.setLayout(null);
        setSize(new Dimension(692, 503));
        setTitle("个人信息助理");
        this.addWindowListener(new MainFrame_this_windowAdapter(this));
        this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        setResizable(false);
        RCGZ.setMaximumSize(new Dimension(33, 9));
        RCGZ.setMinimumSize(new Dimension(33, 9));
        RCGZ.setPreferredSize(new Dimension(41, 23));
        RCGZ.setIcon(img3);
        RCGZ.setSelectedIcon(null);
        RCGZ.addActionListener(new MainFrame_RCGZ_actionAdapter(this));
        TXB.setIcon(img7);
        TXB.addActionListener(new MainFrame_TXB_actionAdapter(this));
        MMBW.setIcon(img9);
        MMBW.addActionListener(new MainFrame_MMBW_actionAdapter(this));
        SHSS.setIcon(img5);
        SHSS.addActionListener(new MainFrame_SHSS_actionAdapter(this));
        YHGL.setIcon(img11);
        YHGL.setSelectedIcon(img12);
        YHGL.addActionListener(new MainFrame_YHGL_actionAdapter(this));
        HELP.setBounds(new Rectangle(25, 2, 50, 50));
        HELP.setIcon(img12);
        HELP.addActionListener(new MainFrame_HELP_actionAdapter(this));
        ZX.setBounds(new Rectangle(191, 2, 50, 50));
        ZX.setIcon(img13);
        ZX.addActionListener(new MainFrame_ZX_actionAdapter(this));
        jSplitPane1.setEnabled(false);
        jSplitPane1.setBorder(BorderFactory.createEtchedBorder());
        jSplitPane1.setOpaque(false);
        jSplitPane1.setPreferredSize(new Dimension(2, 364));
        jSplitPane1.setContinuousLayout(true);
        jSplitPane1.setBounds(new Rectangle(11, 55, 662, 391));
        jSplitPane1.setDividerLocation(100);
        jSplitPane1.setDividerSize(5);
        jSplitPane1.setRightComponent(jPanel1);
        jPanel2.setLayout(xYLayout1);
        jButton1.setText("jButton1");
        jButton2.setBounds(new Rectangle(609, 1, 50, 50));
        jButton2.setPreferredSize(new Dimension(41, 23));
        jButton2.setIcon(imgSearch);
        jButton2.addActionListener(new MainFrame_jButton2_actionAdapter(this));
        jLabel2.setBounds(new Rectangle(11, 448, 177, 24));
       // jLabel1.setText("当前日期:"+(new java.util.Date()).toLocaleString());
        new A(jLabel1).start();
        jLabel1.setBounds(new Rectangle(487, 447, 186, 24));
        jPanel3.setLayout(null);
        jLabel3.setFont(new java.awt.Font("新宋体", Font.PLAIN, 14));
        jLabel3.setText("搜索");
        jLabel3.setBounds(new Rectangle(569, 24, 47, 28));
        contentPane.setBackground(new Color(227, 227, 255));
        jPanel2.setBackground(new Color(227, 241, 255));
        jLabel4.setText("日");
        jLabel5.setText("常");
        jLabel6.setText("工");
        jLabel7.setText("作");
        jLabel8.setText("生");
        jLabel9.setText("活");
        jLabel10.setText("琐");
        jLabel11.setText("事");
        jLabel12.setText("通");
        jLabel13.setText("讯");
        jLabel14.setText("簿");
        jLabel15.setText("密");
        jLabel16.setText("码");
        jLabel17.setText("备");
        jLabel18.setText("忘");
        jLabel19.setText("户");
        jLabel20.setText("管");
        jLabel21.setText("理");
        jLabel22.setText("用");
        jLabel23.setText("帮助");
        jLabel23.setBounds(new Rectangle(78, 22, 37, 26));
        jLabel24.setText("注销");
        jLabel24.setBounds(new Rectangle(249, 22, 43, 26));
        jButton3.setBounds(new Rectangle(108, 2, 50, 50));
        jButton3.setIcon(img14);
        jButton3.addActionListener(new MainFrame_jButton3_actionAdapter(this));
        jLabel25.setText("刷新");
        jLabel25.setBounds(new Rectangle(162, 22, 43, 26));
        contentPane.add(jSplitPane1);
        contentPane.add(jLabel2);
        contentPane.add(jLabel1);
        contentPane.add(jLabel3);
        contentPane.add(HELP);
        contentPane.add(jLabel23);
        contentPane.add(jButton2);
        contentPane.add(jButton3);
        contentPane.add(jLabel25);
        contentPane.add(ZX);
        contentPane.add(jLabel24);
        jSplitPane1.add(jPanel2, JSplitPane.LEFT);
        jSplitPane1.add(sc, JSplitPane.RIGHT);
        jPanel2.add(jLabel7, new XYConstraints(80, 52, 24, 20));
        jPanel2.add(jLabel6, new XYConstraints(80, 39, 24, 20));
        jPanel2.add(jLabel5, new XYConstraints(80, 24, 24, 20));
        jPanel2.add(jLabel4, new XYConstraints(80, 8, 24, 20));
        jPanel2.add(jLabel8, new XYConstraints(80, 81, 24, 20));
        jPanel2.add(jLabel9, new XYConstraints(80, 96, 24, 20));
        jPanel2.add(jLabel11, new XYConstraints(80, 124, 24, 20));
        jPanel2.add(jLabel10, new XYConstraints(79, 110, 24, 20));
        jPanel2.add(jLabel14, new XYConstraints(80, 199, 24, 20));
        jPanel2.add(jLabel13, new XYConstraints(80, 179, 24, 20));
        jPanel2.add(jLabel12, new XYConstraints(80, 160, 24, 20));
        jPanel2.add(jLabel15, new XYConstraints(80, 232, 24, 20));
        jPanel2.add(jLabel16, new XYConstraints(80, 249, 24, 20));
        jPanel2.add(jLabel17, new XYConstraints(80, 265, 24, 20));
        jPanel2.add(jLabel18, new XYConstraints(80, 283, 24, 20));
        jPanel2.add(jLabel22, new XYConstraints(80, 310, 24, 20));
        jPanel2.add(jLabel19, new XYConstraints(80, 325, 24, 20));
        jPanel2.add(jLabel20, new XYConstraints(80, 342, 24, 20));
        jPanel2.add(jLabel21, new XYConstraints(80, 361, 24, 20));
        jPanel2.add(SHSS, new XYConstraints(6, 86, 70, 70));
        jPanel2.add(TXB, new XYConstraints(6, 160, 70, 70));
        jPanel2.add(MMBW, new XYConstraints(6, 236, 70, 70));
        jPanel2.add(YHGL, new XYConstraints(6, 311, 70, 70));
        jPanel2.add(RCGZ, new XYConstraints(6, 3, 70, 70));
    }

    static int i=0;
    public void RCGZ_actionPerformed(ActionEvent e) {
    jSplitPane1.remove(jSplitPane1.getRightComponent());
     Ricgz  Ric = new Ricgz();
    jSplitPane1.add(Ric,JSplitPane.RIGHT);
    //System.out.print(jLabel2.getText());
    i=1;
    }

⌨️ 快捷键说明

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