frame1.java~7~

来自「java GUI用户界面程序」· JAVA~7~ 代码 · 共 50 行

JAVA~7~
50
字号
package chapter7.layout;

import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;

public class Frame1
    extends JFrame
{
    FlowLayout flowLayout1 = new FlowLayout();
    XYLayout xYLayout1 = new XYLayout();
    JTabbedPane jTabbedPane1 = new JTabbedPane();
    JPanel jPanel1 = new JPanel();
    JPanel jPanel2 = new JPanel();

    /**
     *
     */
    public Frame1()
    {
        getContentPane().setLayout(flowLayout1);
        try
        {
            jbInit();
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
        }
    }

    public static void main(String[] args)
    {
        Frame1 f1 = new Frame1();
        f1.setSize(250, 250);
        f1.setVisible(true);
    }

    private void jbInit()
        throws Exception
    {
        this.getContentPane().setLayout(xYLayout1);
        this.getContentPane().add(jTabbedPane1,
                                  new XYConstraints(22, 39, 342, 238));
        jTabbedPane1.add(jPanel1, "jPanel1");
        jTabbedPane1.add(jPanel2, "jPanel2");
    }
}

⌨️ 快捷键说明

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