?? help.java~8~
字號:
package Statistics;import javax.swing.*;import java.awt.*;import java.util.*;public class Help extends JFrame { Vector v1; JList jList1 = new JList(); JScrollPane jScrollPane1 = new JScrollPane(); JLabel jLabel1 = new JLabel(); JTextArea jTextArea1 = new JTextArea(); public Help() { try { help(); jbInit(); choice(); } catch(Exception ex) { ex.printStackTrace(); } } void jbInit() throws Exception { jTextArea1.setBounds(new Rectangle(161, 69, 279, 308)); jLabel1.setText("Topics"); jLabel1.setBounds(new Rectangle(34, 46, 68, 19)); jScrollPane1.setBounds(new Rectangle(33, 68, 109, 307)); this.getContentPane().setLayout(null); this.getContentPane().add(jScrollPane1, null); this.getContentPane().add(jLabel1, null); this.getContentPane().add(jTextArea1, null); jScrollPane1.getViewport().add(jList1, null); this.setBounds(0,0,600,600); this.setVisible(true); this.setDefaultCloseOperation(EXIT_ON_CLOSE); } public static void main(String[] args) { Help help = new Help(); } void help(){ v1 = new Vector(); v1.addElement("Connect Log File"); v1.addElement("Open Report File"); jList1.setListData(v1); } void choice(){ if (jList1.getSelectedIndex()==0) jTextArea1.append("dkfuhsdkjfhsd"); else //(jList1.getSelectedIndex()==1) jTextArea1.append("aaaaaa"); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -