frame2.java~2~

来自「这是我最得意的一件小作品。它是一个基于C/S模式的网络考试系统」· JAVA~2~ 代码 · 共 50 行

JAVA~2~
50
字号
package testsystem;

import java.awt.*;

import javax.swing.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2009</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Frame2 extends JFrame {
    JPanel contentPane;
    FlowLayout flowLayout1 = new FlowLayout();
    JButton jButton1 = new JButton();
    JTextField jTextField1 = new JTextField();

    public Frame2() {
        try {
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    /**
     * Component initialization.
     *
     * @throws java.lang.Exception
     */
    private void jbInit() throws Exception {
        contentPane = (JPanel) getContentPane();
        contentPane.setLayout(flowLayout1);
        setSize(new Dimension(400, 300));
        setTitle("Frame Title");
        jButton1.setText("jButton1");
        jTextField1.setText("jTextField1");
        contentPane.add(jButton1);
        contentPane.add(jTextField1);
    }
}

⌨️ 快捷键说明

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