?? jframe.java
字號:
/* * JFrame.java * * Created on 2004年9月27日, 下午9:48 *//** * * @author litertiger */public class JFrame extends javax.swing.JFrame { /** Creates new form JFrame */ public JFrame() { 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. */ private void initComponents() {//GEN-BEGIN:initComponents b1 = new javax.swing.JButton(); t1 = new javax.swing.JTextArea(); getContentPane().setLayout(new java.awt.FlowLayout()); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); b1.setText("ok"); getContentPane().add(b1); t1.setBackground(new java.awt.Color(51, 255, 255)); t1.setColumns(40); t1.setLineWrap(true); t1.setRows(10); t1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { t1KeyReleased(evt); } }); getContentPane().add(t1); pack(); }//GEN-END:initComponents private void t1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_t1KeyReleasedt1.setText("the key released"); // TODO 將在此處增加您的處理代碼: }//GEN-LAST:event_t1KeyReleased /** Exit the Application */ private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm System.exit(0); }//GEN-LAST:event_exitForm /** * @param args the command line arguments */ public static void main(String args[]) { new JFrame().show(); } // 變量聲明 - 不進行修改//GEN-BEGIN:variables private javax.swing.JButton b1; private javax.swing.JTextArea t1; // 變量聲明結束//GEN-END:variables }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -