?? firstapplet.java
字號:
package espc;import java.awt.*;import java.awt.event.*;import java.applet.*;import javax.swing.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class FirstApplet extends Applet { private boolean isStandalone = false; JButton jButton1 = new JButton(); BorderLayout borderLayout1 = new BorderLayout(); //Get a parameter value public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } //Construct the applet public FirstApplet() { } //Initialize the applet public void init() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { jButton1.setFont(new java.awt.Font("Dialog", 0, 15)); jButton1.setActionCommand("jButton1"); jButton1.setText("點擊進(jìn)入主界面!"); jButton1.addActionListener(new FirstApplet_jButton1_actionAdapter(this)); this.setLayout(borderLayout1); this.add(jButton1, BorderLayout.CENTER); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } void jButton1_actionPerformed(ActionEvent e) { LoginFrame loginFrame=new LoginFrame(); loginFrame.setVisible(true);// TestFrame testFrame=new TestFrame();// testFrame.setSize(400,300);// testFrame.setVisible(true); }}class FirstApplet_jButton1_actionAdapter implements java.awt.event.ActionListener { FirstApplet adaptee; FirstApplet_jButton1_actionAdapter(FirstApplet adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton1_actionPerformed(e); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -