📄 frame1.java~2~
字号:
package chapter7.layout;
import java.awt.*;
import javax.swing.*;
public class Frame1
extends JFrame
{
JButton jButton1 = new JButton();
FlowLayout flowLayout1 = new FlowLayout();
/**
*
*/
public Frame1()
{
getContentPane().setLayout(flowLayout1);
jButton1.setText("jButton1");
jButton1.setBounds(20, 20, 200, 200);
this.getContentPane().add(jButton1, null);
}
public static void main(String[] args)
{
Frame1 f1 = new Frame1();
f1.setSize(250, 250);
f1.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -