📄 mainframe.java~58~
字号:
package hotelinformationmanagesystem;
import RoomManagement.*;
import EmpManagement.*;
import InfoQueryList.*;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.Font;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import javax.swing.JOptionPane;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JCheckBoxMenuItem;
import InfoQuery.InfoQuery;
/**
* <p>Title: 酒店信息管理系统</p>
*
* <p>Description: HotelInformationManageSystem</p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: JSP</p>
*
* @author 江世澎
* @version 1.0
*/
public class MainFrame extends JFrame {
JMenuBar jMenuBar1 = new JMenuBar();
JMenu jMSysManage = new JMenu();
JMenu jMUserManage = new JMenu();
JMenu jMManagerInterface = new JMenu();
JMenuItem jMPopedomManage = new JMenuItem();
JMenuItem jMCodeSet01 = new JMenuItem();
JMenuItem jMCodeSet02 = new JMenuItem();
JMenuItem jMQuit = new JMenuItem();
JMenu jMHoterInfoSet = new JMenu();
JMenu jMGuestInfoManage = new JMenu();
JMenu jMGuestSettleAccounts = new JMenu();
JMenu jMEmpInfoSet = new JMenu();
JMenu jMEmpsInfoSet = new JMenu();
JMenuItem jMEmpInfoManage = new JMenuItem();
JMenuItem jMEmpInfoQuery = new JMenuItem();
JMenu jMEmpOnDutyInfoSet = new JMenu();
JMenuItem jMEmpOnDutyManage = new JMenuItem();
JMenuItem jMEmpOnDutyQuery = new JMenuItem();
JMenu jMRoomInfoSet = new JMenu();
JMenuItem jMRoomInfoManage = new JMenuItem();
JMenuItem jMRoomInfoQuery = new JMenuItem();
JMenu jMGuestRegisterSet = new JMenu();
JMenu jMGuestPrearrangeSet = new JMenu();
JMenu jMRoomInfoManageSets = new JMenu();
JMenuItem jMRoomState = new JMenuItem();
JMenuItem jMVacancyRoomQuery = new JMenuItem();
XYLayout xYLayout1 = new XYLayout();
JPanel jPShowInf = new JPanel();
XYLayout xYLayout2 = new XYLayout();
JLabel jLShowInf = new JLabel();
JLabel jLShowName = new JLabel();
JLabel jLShowDepartment = new JLabel();
JLabel jLShowDuty = new JLabel();
JLabel jLGetName = new JLabel();
JLabel jLGetDepartment = new JLabel();
JLabel jLGetDuty = new JLabel();
JMenuItem jMOneSelfSettleAccounts = new JMenuItem();
JMenuItem jMenuItem11 = new JMenuItem();
JMenuItem jMAbout = new JMenuItem();
public static String strGuestStyle = null;
JMenuItem jMGuestQuery = new JMenuItem();
JMenuItem jMOneselfRegisterSet = new JMenuItem();
JMenuItem jMGroupRegisterSet = new JMenuItem();
JMenuItem jMOneSelfPrearrangeSet = new JMenuItem();
JMenuItem jMGroupPrearrangeSet = new JMenuItem();
JMenuItem jMInfoQuery = new JMenuItem();
public MainFrame() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setBounds(0, 0, 1279, 770); //窗口的位置
getContentPane().setLayout(xYLayout1);
jMSysManage.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMSysManage.setActionCommand("系统管理");
jMSysManage.setText("系统管理");
jMUserManage.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMUserManage.setText("用户管理界面 ");
jMManagerInterface.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMManagerInterface.setActionCommand("管理员界面");
jMManagerInterface.setText("管理员界面");
jMPopedomManage.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMPopedomManage.setText("权限管理");
jMPopedomManage.addActionListener(new
MainFrame_jMenuItem1_actionAdapter(this));
jMCodeSet01.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMCodeSet01.setText("密码设置");
jMCodeSet01.addActionListener(new MainFrame_jMenuItem2_actionAdapter(this));
jMCodeSet02.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMCodeSet02.setText("密码设置");
jMCodeSet02.addActionListener(new MainFrame_jMenuItem3_actionAdapter(this));
jMQuit.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMQuit.setText("退出系统");
jMQuit.addActionListener(new MainFrame_jMenuItem5_actionAdapter(this));
jMHoterInfoSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMHoterInfoSet.setText("酒店信息设置");
jMGuestInfoManage.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMGuestInfoManage.setText("客人信息管理");
jMGuestSettleAccounts.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMGuestSettleAccounts.setText("客人结账处理");
jMEmpInfoSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMEmpInfoSet.setText("酒店员工信息设置");
jMEmpsInfoSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMEmpsInfoSet.setText("员工信息设置");
jMEmpInfoManage.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMEmpInfoManage.setText("员工信息管理");
jMEmpInfoManage.addActionListener(new
MainFrame_jMenuItem6_actionAdapter(this));
jMEmpInfoQuery.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMEmpInfoQuery.setText("员工信息查询");
jMEmpInfoQuery.addActionListener(new
MainFrame_jMenuItem10_actionAdapter(this));
jMEmpOnDutyInfoSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMEmpOnDutyInfoSet.setText("值班员工信息设置");
jMEmpOnDutyManage.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMEmpOnDutyManage.setText("值班员工信息管理");
jMEmpOnDutyManage.addActionListener(new
MainFrame_jMenuItem8_actionAdapter(this));
jMEmpOnDutyQuery.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMEmpOnDutyQuery.setText("值班员工信息查询 ");
jMEmpOnDutyQuery.addActionListener(new
MainFrame_jMenuItem14_actionAdapter(this));
jMRoomInfoSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMRoomInfoSet.setText("酒店客房信息设置");
jMRoomInfoManage.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMRoomInfoManage.setText("酒店客房信息管理");
jMRoomInfoManage.addActionListener(new
MainFrame_jMenuItem7_actionAdapter(this));
jMRoomInfoQuery.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMRoomInfoQuery.setText("酒店客房信息查询");
jMRoomInfoQuery.addActionListener(new
MainFrame_jMenuItem16_actionAdapter(this));
jMGuestRegisterSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMGuestRegisterSet.setText("客人登记设置");
jMGuestPrearrangeSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMGuestPrearrangeSet.setText("客人预定设置");
jMRoomInfoManageSets.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMRoomInfoManageSets.setText("客房信息管理 ");
jMRoomState.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMRoomState.setText("客房状态设置");
jMRoomState.addActionListener(new MainFrame_jMenuItem29_actionAdapter(this));
jMVacancyRoomQuery.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMVacancyRoomQuery.setText("空闲客房查询");
jMVacancyRoomQuery.addActionListener(new
MainFrame_jMenuItem30_actionAdapter(this));
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setIconImage(null);
this.setJMenuBar(jMenuBar1);
this.setResizable(false);
this.setTitle("酒店信息管理系统主界面");
xYLayout1.setWidth(1276);
xYLayout1.setHeight(371);
jPShowInf.setBorder(BorderFactory.createEtchedBorder());
jPShowInf.setToolTipText("登录人员的基本信息");
jPShowInf.setLayout(xYLayout2);
jLShowInf.setFont(new java.awt.Font("宋体", Font.BOLD, 25));
jLShowInf.setToolTipText("当前使用本系统的用户");
jLShowInf.setText("当前登录用户为:");
jLShowName.setFont(new java.awt.Font("宋体", Font.BOLD, 25));
jLShowName.setToolTipText("当前使用本系统的用户姓名");
jLShowName.setText("用户姓名:");
jLShowDepartment.setFont(new java.awt.Font("宋体", Font.BOLD, 25));
jLShowDepartment.setToolTipText("当前使用本系统的用户所在部门");
jLShowDepartment.setText("所在部门:");
jLShowDuty.setFont(new java.awt.Font("宋体", Font.BOLD, 25));
jLShowDuty.setText("职务:");
jLGetName.setFont(new java.awt.Font("宋体", Font.BOLD | Font.ITALIC, 25));
jLGetDepartment.setFont(new java.awt.Font("宋体", Font.BOLD | Font.ITALIC,
25));
jLGetDuty.setFont(new java.awt.Font("宋体", Font.BOLD | Font.ITALIC, 25));
jMOneSelfSettleAccounts.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMOneSelfSettleAccounts.setText("散客结账处理");
jMOneSelfSettleAccounts.addActionListener(new
MainFrame_jMenuItem9_actionAdapter(this));
jMenuItem11.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMenuItem11.setText("团体结账处理");
jMenuItem11.addActionListener(new MainFrame_jMenuItem11_actionAdapter(this));
jMAbout.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMAbout.setText("关于");
jMAbout.addActionListener(new MainFrame_jMenuItem4_actionAdapter(this));
jMGuestQuery.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMGuestQuery.setText("客人信息查询");
jMGuestQuery.addActionListener(new MainFrame_jMenuItem13_actionAdapter(this));
jMOneselfRegisterSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMOneselfRegisterSet.setActionCommand("客户登记设置");
jMOneselfRegisterSet.setText("散客登记设置");
jMOneselfRegisterSet.addActionListener(new
MainFrame_jMenuItem12_actionAdapter(this));
jMGroupRegisterSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMGroupRegisterSet.setText("团体登记设置");
jMGroupRegisterSet.addActionListener(new
MainFrame_jMenuItem15_actionAdapter(this));
jMOneSelfPrearrangeSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMOneSelfPrearrangeSet.setActionCommand("客户预定设置");
jMOneSelfPrearrangeSet.setText("散客预定设置");
jMOneSelfPrearrangeSet.addActionListener(new
MainFrame_jMenuItem17_actionAdapter(this));
jMGroupPrearrangeSet.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMGroupPrearrangeSet.setText("团体预定设置");
jMGroupPrearrangeSet.addActionListener(new
MainFrame_jMenuItem18_actionAdapter(this));
jMInfoQuery.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jMInfoQuery.setText("内部信息查询");
jMInfoQuery.addActionListener(new MainFrame_jMInfoQuery_actionAdapter(this));
jMenuBar1.add(jMSysManage);
jMenuBar1.add(jMHoterInfoSet);
jMenuBar1.add(jMGuestInfoManage);
jMenuBar1.add(jMGuestSettleAccounts);
jMenuBar1.add(jMRoomInfoManageSets);
jMSysManage.add(jMManagerInterface);
jMSysManage.addSeparator();
jMSysManage.add(jMUserManage);
jMSysManage.addSeparator();
jMSysManage.add(jMInfoQuery);
jMSysManage.addSeparator();
jMSysManage.add(jMQuit);
jMSysManage.addSeparator();
jMSysManage.add(jMAbout);
jMManagerInterface.add(jMPopedomManage);
jMManagerInterface.addSeparator();
jMManagerInterface.add(jMCodeSet01);
jMUserManage.add(jMCodeSet02);
jMHoterInfoSet.add(jMEmpInfoSet);
jMHoterInfoSet.addSeparator();
jMHoterInfoSet.add(jMRoomInfoSet);
jMEmpInfoSet.add(jMEmpsInfoSet);
jMEmpInfoSet.addSeparator();
jMEmpInfoSet.add(jMEmpOnDutyInfoSet);
jMEmpsInfoSet.add(jMEmpInfoManage);
jMEmpsInfoSet.add(jMEmpInfoQuery);
jMEmpOnDutyInfoSet.add(jMEmpOnDutyManage);
jMEmpOnDutyInfoSet.add(jMEmpOnDutyQuery);
jMRoomInfoSet.add(jMRoomInfoManage);
jMRoomInfoSet.add(jMRoomInfoQuery);
jMGuestInfoManage.add(jMGuestRegisterSet);
jMGuestInfoManage.addSeparator();
jMGuestInfoManage.add(jMGuestPrearrangeSet);
jMGuestInfoManage.addSeparator();
jMGuestInfoManage.add(jMGuestQuery);
jMGuestRegisterSet.add(jMOneselfRegisterSet);
jMGuestRegisterSet.addSeparator();
jMGuestRegisterSet.add(jMGroupRegisterSet);
jMGuestPrearrangeSet.add(jMOneSelfPrearrangeSet);
jMGuestPrearrangeSet.addSeparator();
jMGuestPrearrangeSet.add(jMGroupPrearrangeSet);
jMRoomInfoManageSets.add(jMRoomState);
jMRoomInfoManageSets.add(jMVacancyRoomQuery);
jPShowInf.add(jLShowInf, new XYConstraints(1, 1, -1, -1));
jPShowInf.add(jLShowName, new XYConstraints(278, 29, -1, -1));
jPShowInf.add(jLShowDepartment, new XYConstraints(621, 29, -1, -1));
jPShowInf.add(jLShowDuty, new XYConstraints(979, 29, -1, -1));
jPShowInf.add(jLGetName, new XYConstraints(406, 64, 150, 50));
jPShowInf.add(jLGetDepartment, new XYConstraints(751, 64, 150, 50));
jPShowInf.add(jLGetDuty, new XYConstraints(1072, 64, 150, 50));
this.getContentPane().add(jPShowInf, new XYConstraints(3, 2, 1268, 127));
jMGuestSettleAccounts.add(jMOneSelfSettleAccounts);
jMGuestSettleAccounts.add(jMenuItem11);
}
public void jMenuItem5_actionPerformed(ActionEvent e) { //退出
int inSelect = JOptionPane.showConfirmDialog(null, "是否要退出系统!", "系统提示",
JOptionPane.YES_NO_OPTION);
if (inSelect == 0) { //inSelect为0时,用户选则“是”
System.exit(0); //退出系统
}
}
public void jMenuItem6_actionPerformed(ActionEvent e) { //员工信息管理
EmpInfRecord empinfrecord = new EmpInfRecord();
empinfrecord.setVisible(true);
}
public void jMenuItem8_actionPerformed(ActionEvent e) { //值班员工管理
EmpOnDutyRec empondutyrec = new EmpOnDutyRec();
empondutyrec.setVisible(true);
}
public void jMenuItem14_actionPerformed(ActionEvent e) { //值班员工查询
EmpManagement.EmpOnDutyQuery empondutyquery = new EmpManagement.
EmpOnDutyQuery();
empondutyquery.setVisible(true);
}
public void jMenuItem2_actionPerformed(ActionEvent e) { //密码修改
ModifPassword modifpasswordm = new ModifPassword();
modifpasswordm.setVisible(true);
}
public void jMenuItem3_actionPerformed(ActionEvent e) { //密码修改
ModifPassword modif = new ModifPassword();
modif.setVisible(true);
}
public void jMenuItem1_actionPerformed(ActionEvent e) { //权限修改
EmpManagement.EmpInfRecord empinfrecord = new EmpManagement.
EmpInfRecord();
empinfrecord.setVisible(true);
}
public void jMenuItem10_actionPerformed(ActionEvent e) { //员工信息查询
EmpManagement.EmpInfoQuery empinfoquery = new EmpManagement.
EmpInfoQuery();
empinfoquery.setVisible(true);
}
public void jMenuItem7_actionPerformed(ActionEvent e) { //客房信息管理
RoomManagement.RoomInfoSetting roominfosetting = new RoomManagement.
RoomInfoSetting();
roominfosetting.setVisible(true);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -