package com.hua.view;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.ImageIcon;
import javax.swing.JTabbedPane;
import javax.swing.JPanel;
import java.awt.Color;
import javax.swing.UIManager;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import java.awt.SystemColor;
import com.hua.view.driverInfo.DriverInfoTablelixtFrame;
import com.hua.view.Tools;
import java.awt.Font;
import com.hua.view.customerInfo.CustomerInfoListFrame;
import com.hua.view.consigneeInfoFrame.ConsigneeInfoListFrame;
import com.hua.view.escortInfo.EscortInfoListFrame;
import com.hua.view.truckdeCompany.truckdeCompanylistFrame;
public class MainFrame extends JFrame{
public MainFrame() {
try {
loadImg();
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
ImageIcon topImg = new ImageIcon("img/top.png");
ImageIcon truckdeCompanyImg = new ImageIcon("img/挂靠单位.png");
ImageIcon consigneeInfoImg = new ImageIcon("img/收货方资料.png");
ImageIcon escortInfoImg = new ImageIcon("img/押运员资料.png");
ImageIcon customer = new ImageIcon("img/客户资料.png");
ImageIcon car = new ImageIcon("img/车辆资料.png");
ImageIcon driverInfoImg = new ImageIcon("img/司机资料.png");
ImageIcon[] lanseImg = new ImageIcon[7];
ImageIcon[] baiseImg = new ImageIcon[7];
private void loadImg() {
this.jLabel1.setIcon(car);
this.jLabel2.setIcon(customer);
this.jLabel3.setIcon(consigneeInfoImg);
this.jLabel4.setIcon(escortInfoImg);
this.jLabel5.setIcon(truckdeCompanyImg);
this.jLabel1.setIcon(car);
this.lblImgTop.setIcon(topImg);
this.lblDriverInfo.setIcon(driverInfoImg);
lanseImg[0] = new ImageIcon("img/蓝色财务管理.jpg");
lanseImg[1] = new ImageIcon("img/蓝色车辆管理.jpg");
lanseImg[2] = new ImageIcon("img/蓝色经营分析.jpg");
lanseImg[3] = new ImageIcon("img/蓝色配件管理.jpg");
lanseImg[4] = new ImageIcon("img/蓝色系统维护.jpg");
lanseImg[5] = new ImageIcon("img/蓝色业务管理.jpg");
lanseImg[6] = new ImageIcon("img/蓝色油卡管理.jpg");
baiseImg[0] = new ImageIcon("img/白色财务管理.jpg");
baiseImg[1] = new ImageIcon("img/白色车辆管理.jpg");
baiseImg[2] = new ImageIcon("img/白色经营分析.jpg");
baiseImg[3] = new ImageIcon("img/白色配件管理.jpg");
baiseImg[4] = new ImageIcon("img/白色系统维护.jpg");
baiseImg[5] = new ImageIcon("img/白色业务管理.jpg");
baiseImg[6] = new ImageIcon("img/白色油卡管理.jpg");
}
private void jbInit() throws Exception {
this.getContentPane().setLayout(null);
this.setSize(1024, 740);
this.getContentPane().setBackground(Color.blue);
this.setJMenuBar(jMenuBar1);
jMenu1.setText("系统");
jMenuItem1.setText("重新登陆");
jMenuItem2.setText("退出系统");
jMenuItem3.setText("修改密码");
jMenu2.setText("司机信息");
jMenuItem4.setText("新增司机信息");
jMenuItem4.addActionListener(new MainFrame_jMenuItem4_actionAdapter(this));
jMenuItem5.setText("司机信息查询");
jMenu3.setText("帮助");
jMenuItem6.setText("关于我们");
lblImgTop.setText("jLabel1");
lblImgTop.setBounds(0, 0, 1024, 83);
tbP.setTabPlacement(JTabbedPane.LEFT);
tbP.setBackground(Color.blue);
tbP.setBounds(new Rectangle(88, 79, 422, 275));
tbP.addMouseListener(new MainFrame_tbP_mouseAdapter(this));
jPanel1.setLayout(null);
jPanel1.setBackground(Color.pink);
jPanel2.setLayout(null);
jPanel2.setBackground(Color.lightGray);
jPanel3.setBackground(Color.yellow);
jPanel3.setLayout(null);
jPanel4.setBackground(Color.red);
jPanel5.setLayout(null);
jPanel6.setBackground(Color.orange);
jPanel7.setBackground(Color.blue);
lblDriverInfo.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
lblDriverInfo.setText("司机资料信息");
lblDriverInfo.setBounds(new Rectangle(65, 26, 180, 68));
lblDriverInfo.addMouseListener(new MainFrame_lblDriverInfo_mouseAdapter(this));
jPanel5.setBackground(UIManager.getColor("menu"));
jLabel1.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jLabel1.setText("车辆资料信息");
jLabel1.setBounds(new Rectangle(74, 43, 287, 53));
jLabel1.addMouseListener(new MainFrame_jLabel1_mouseAdapter(this));
jLabel2.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jLabel2.setText("客户资料");
jLabel2.setBounds(new Rectangle(80, 26, 213, 45));
jLabel2.addMouseListener(new MainFrame_jLabel2_mouseAdapter(this));
jLabel3.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jLabel3.setText("收货方信息");
jLabel3.setBounds(new Rectangle(62, 51, 319, 54));
jLabel3.addMouseListener(new MainFrame_jLabel3_mouseAdapter(this));
jLabel4.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jLabel4.setText("押运员信息");
jLabel4.setBounds(new Rectangle(62, 163, 267, 67));
jLabel4.addMouseListener(new MainFrame_jLabel4_mouseAdapter(this));
jLabel5.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jLabel5.setText("挂靠单位");
jLabel5.setBounds(new Rectangle(82, 114, 230, 82));
jLabel5.addMouseListener(new MainFrame_jLabel5_mouseAdapter(this));
jMenuBar1.add(jMenu1);
jMenuBar1.add(jMenu2);
jMenuBar1.add(jMenu3);
jMenu1.add(jMenuItem1);
jMenu1.add(jMenuItem2);
jMenu1.add(jMenuItem3);
jMenu2.add(jMenuItem4);
jMenu2.add(jMenuItem5);
jMenu3.add(jMenuItem6);
this.getContentPane().add(lblImgTop);
this.getContentPane().add(tbP);
tbP.add(jPanel1, baiseImg[0]);
jPanel1.add(jLabel2);
jPanel1.add(jLabel5);
tbP.add(jPanel2, lanseImg[1]);
jPanel2.add(jLabel1);
tbP.add(jPanel3, lanseImg[2]);
jPanel3.add(jLabel3);
jPanel3.add(jLabel4);
tbP.add(jPanel4, lanseImg[3]);
tbP.add(jPanel5, lanseImg[4]);
jPanel5.add(lblDriverInfo);
tbP.add(jPanel6, lanseImg[5]);
tbP.add(jPanel7, lanseImg[6]);
tbP.setBounds(0, 83, 1024, 740-100);
}
JMenuBar jMenuBar1 = new JMenuBar();
JMenu jMenu1 = new JMenu();
JMenuItem jMenuItem1 = new JMenuItem();
JMenuItem jMenuItem2 = new JMenuItem();
JMenuItem jMenuItem3 = new JMenuItem();
JMenu jMenu2 = new JMenu();
JMenuItem jMenuItem4 = new JMenuItem();
JMenuItem jMenuItem5 = new JMenuItem();
JMenu jMenu3 = new JMenu();
JMenuItem jMenuItem6 = new JMenuItem();
JLabel lblImgTop = new JLabel();
JTabbedPane tbP = new JTabbedPane();
JPanel jPanel1 = new JPanel();
JPanel jPanel2 = new JPanel();
JPanel jPanel3 = new JPanel();
JPanel jPanel4 = new JPanel();
JPanel jPanel5 = new JPanel();
JPanel jPanel6 = new JPanel();
JPanel jPanel7 = new JPanel();
JLabel lblDriverInfo = new JLabel();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
public void jMenuItem4_actionPerformed(ActionEvent e) {
DriverInfoTablelixtFrame frame = new DriverInfoTablelixtFrame();
Tools.showCenterFrame(frame);
}
public void lblDriverInfo_mouseClicked(MouseEvent e) {
DriverInfoTablelixtFrame f = new DriverInfoTa
- 1
- 2
- 3
前往页