📄 testflowlayout2.java
字号:
import java.awt.*;
public class TestFlowLayout2 {
public static void main(String args[]) {
Frame f = new Frame("Java Frame");
FlowLayout l =
new FlowLayout(FlowLayout.CENTER, 20, 40);
f.setLayout(l);
f.setLocation(300,400);
f.setSize(300,200);
f.setBackground(new Color(204,204,255));
for(int i = 1; i<=7; i++){
f.add(new Button("BUTTON"));
}
f.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -