java基础问题请教!
发表于:2007-07-01来源:作者:点击数:
标签:
import java .awt.*;import java.awt.event.*;import javax.swing.*;public class GridLayoutDemo extends JFrame implements ActionListener{private JButton buttons[];private final String names[]={"one","two","three","four","five","six"};private bo
import
java.awt.*;import java.awt.event.*;import javax.swing.*;public class GridLayoutDemo extends JFrame implements ActionListener{ private JButton buttons[]; private final String names[]={"one","two","three","four","five","six"}; private boolean flag = true; private Container container; private GridLayout grid1,grid2; public GridLayoutDemo() { super("GridLayout Demo"); grid1=new GridLayout(2,3,5,5); grid2=new GridLayout(3,2); Container container=getContentPane(); container.setLayout(grid1); buttons=new JButton[names.length]; for(int count=0;count
原文转自:http://www.ltesting.net