testframe.java

来自「一个applet servlet之间通过序列化对象通讯的例子」· Java 代码 · 共 39 行

JAVA
39
字号
package espc;import javax.swing.*;import java.awt.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class TestFrame extends JFrame {  JLabel jLabel1 = new JLabel();  JLabel jLabel2 = new JLabel();  BorderLayout borderLayout1 = new BorderLayout();  public TestFrame() {    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  public static void main(String[] args) {    TestFrame testFrame = new TestFrame();  }  private void jbInit() throws Exception {    jLabel1.setText("jLabel1");    this.setTitle("测试Frame");    this.getContentPane().setLayout(borderLayout1);    jLabel2.setText("jLabel2");    this.getContentPane().add(jLabel1, BorderLayout.NORTH);    this.getContentPane().add(jLabel2, BorderLayout.CENTER);  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?