📄 mainframe.java#1.1.1.1
字号:
/* * MainFrame.java * * Created on 2007年12月18日, 下午1:22 */package SBGameCore;/** * * @author wusir */public class MainFrame extends javax.swing.JFrame implements java.awt.event.ActionListener { /** Creates new form MainFrame */ public MainFrame() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">//GEN-BEGIN:initComponents private void initComponents() { menuBar = new javax.swing.JMenuBar(); game_Menu = new javax.swing.JMenu(); newGame_Item = new javax.swing.JMenuItem(); Scor_Item = new javax.swing.JMenuItem(); jSeparator = new javax.swing.JSeparator(); Exit_Item = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("ShotBird"); game_Menu.setText("\u6e38\u620f"); newGame_Item.setText("\u65b0\u5efa\u6e38\u620f"); game_Menu.add(newGame_Item); Scor_Item.setText("\u5f97\u5206"); game_Menu.add(Scor_Item); game_Menu.add(jSeparator); Exit_Item.setText("\u9000\u51fa"); Exit_Item.addActionListener(this); game_Menu.add(Exit_Item); menuBar.add(game_Menu); setJMenuBar(menuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 1004, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 569, Short.MAX_VALUE) ); pack(); } // 将事件从组件分发到事件处理程序的代码。 public void actionPerformed(java.awt.event.ActionEvent evt) { if (evt.getSource() == Exit_Item) { MainFrame.this.Exit_ItemActionPerformed(evt); } }// </editor-fold>//GEN-END:initComponents private void Exit_ItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Exit_ItemActionPerformed System.exit(0); }//GEN-LAST:event_Exit_ItemActionPerformed /** * @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 private javax.swing.JMenuItem Exit_Item; private javax.swing.JMenuItem Scor_Item; private javax.swing.JMenu game_Menu; private javax.swing.JSeparator jSeparator; private javax.swing.JMenuBar menuBar; private javax.swing.JMenuItem newGame_Item; // 变量声明结束//GEN-END:variables }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -