验证中...
私信发送成功
语言: Java
最后更新于 2017-07-27 18:33
MainFrame.txt
原始数据 复制代码
/*
* MainForm.java
*
* Created on __DATE__, __TIME__
*/
package com.ruif.view;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
/**
*
* @author __USER__
*/
public class MainFrame extends javax.swing.JFrame
{
/**
*
*/
private static final long serialVersionUID = -6286095831262390151L;
/** Creates new form MainForm */
public MainFrame()
{
initComponents();
this.setExtendedState(JFrame.MAXIMIZED_BOTH);//窗体最大化
}
//GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents()
{
desktopPane = new javax.swing.JDesktopPane();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenu3 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();
jMenuItem_exit = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
jMenuItem3 = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("\u76d1\u6d4b\u7cfb\u7edf\u4e3b\u754c\u9762");
jMenu1.setText("\u6570\u636e\u7ba1\u7406");
jMenu3.setText("\u6d4b\u6e29\u8bb0\u5f55");
jMenuItem1.setText("\u8bb0\u5f55\u5c55\u5f00");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem1);
jMenuItem2.setText("\u65b0\u589e\u8bb0\u5f55");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem2);
jMenu1.add(jMenu3);
jMenuItem_exit.setText("\u9000\u51fa\u7cfb\u7edf");
jMenuItem_exit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem_exitActionPerformed(evt);
}
});
jMenu1.add(jMenuItem_exit);
jMenuBar1.add(jMenu1);
jMenu2.setText("\u5e2e\u52a9");
jMenuItem3.setText("\u67e5\u770b");
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem3ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem3);
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addComponent(
desktopPane, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 591, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addComponent(
desktopPane, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 452, Short.MAX_VALUE));
pack();
}// </editor-fold>
//GEN-END:initComponents
private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt)
{
HelpFrame hf = new HelpFrame();
hf.setVisible(true);
this.desktopPane.add(hf);
}
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt)
{
AddTemperaFrame atf = new AddTemperaFrame();
atf.setVisible(true);
this.desktopPane.add(atf);
}
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt)
{
ListTemperaFrame ltf = new ListTemperaFrame();
ltf.setVisible(true);
this.desktopPane.add(ltf);
}
private void jMenuItem_exitActionPerformed(java.awt.event.ActionEvent evt)
{
int flag = JOptionPane.showConfirmDialog(null, "确定退出系统?");
if (flag == 0)
{
this.dispose();
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[])
{
java.awt.EventQueue.invokeLater(new Runnable()
{
public void run()
{
new MainFrame().setVisible(true);
}
});
}
//GEN-BEGIN:variables
// Variables declaration - do not modify
private javax.swing.JDesktopPane desktopPane;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu3;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JMenuItem jMenuItem3;
private javax.swing.JMenuItem jMenuItem_exit;
// End of variables declaration//GEN-END:variables
}

评论列表( 0 )

你可以在登录后,对此项目发表评论

4_float_left_people 4_float_left_close