import javax.swing.*; 
import java.awt.*;
public class exa9_2{
	public static void main(String args[])
	{
		JFrame f=new JFrame("This is a window!");
		f.setLocation(100,200);
		f.setSize(200,400);
		FlowLayout fl=new FlowLayout();
		f.getContentPane().setLayout(fl);
			JButton[] jb=new JButton[10];
		for(int i=0;i<jb.length;i++)
	{
		jb[i]=new JButton();
		jb[i].setText(String.valueOf(i));
		f.getContentPane().add(jb[i]);   //ֱˣ
		}
		f.setVisible(true);
	}
}
