flowlayoutdemo2.java
来自「JAVA程序设计课程中各章节的程序实例。」· Java 代码 · 共 28 行
JAVA
28 行
/**
*A flow layout program using the applet
*2004.11.22. xhcprince
*/
import java.applet.*;
import java.awt.*;
public class flowlayoutDemo2 extends Applet
{
Button b1,b2,b3;
public void init()
{
setLayout(new FlowLayout(FlowLayout.CENTER));
b1 = new Button("one");
b2 = new Button("two");
b3 = new Button("three");
add(b1);
add(b2);
add(b3);
}
}
/*
<applet code = "flowlayoutDemo2.class" width = 300 height = 150>
</applet>
*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?