📄 flowlayoutdemo.java
字号:
/**
*A simple flow layout program
*2004.11.22. xhcprince
*/
import java.awt.*;
class A extends Frame
{
A(String s)
{
super(s);
setSize(300,160);
setLayout(new FlowLayout());
for(int i=1; i<=9; ++i)
{
add(new Button("Button " + i));
}
setVisible(true);//The buttons are from left to right,they're not folded together!
} //But it's better to see the actul result!
}
class flowlayoutDemo
{
public static void main(String args[])
{
A a = new A("Flow layout demostration");
}
}//I still have to use the Ctrl+C to explicitly end the program:(
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -