/**
* @(#)TestFlowLayout.java
*
* TestFlowLayout application
*
* @author
* @version 1.00 2007/1/21
*/
import java.awt.*;
import java.awt.event.*;
public class TestFlowLayout extends Frame
{
public void init()
{
add(new Button("第一个"));
add(new Button("第二个"));
add(new Button("第三个"));
add(new Button("第四个"));
}
public TestFlowLayout()
{
FlowLayout fl=new FlowLayout();
setLayout(fl);
init();
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
e.getWindow().dispose();
}
});
}
public static void main(String[] args)
{
System.out.println("Hello World!");
TestFlowLayout mainFram=new TestFlowLayout();
mainFram.setTitle("TestBorderLayout");
mainFram.setBounds(300,200,400,400);
mainFram.setVisible(true);
}
}