java初學者
          所有生命,不管在哪里度過,都具有同樣價值
          posts - 7,  comments - 5,  trackbacks - 0
          import javax.swing.*;
          import java.awt.*;
          public class GridLayoutDemo extends JFrame{
          public GridLayoutDemo()
           {
          ?super("網格布局");
          ?this.setSize(600,300);
          ?this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          }
          public void setlayout(){
          ?FlowLayout layout = new FlowLayout();
          ?Container Contain = getContentPane();
          ?Contain.setLayout(layout);
          ?for(int i=1; i<6;i++)
          {
          ?JButton btn = new JButton("按鈕"+i);
          ?Contain.add(btn);
          ?}
          }
          public static void main(String []args )
          {
          ?GridLayoutDemo GridLay = new GridLayoutDemo();
          ?GridLay.setlayout();
          ?GridLay.show();
          }
          }
          posted @ 2006-12-21 20:04 悠揚---靖寶華 閱讀(305) | 評論 (0)編輯 收藏

          <2006年12月>
          262728293012
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿(1)

          隨筆檔案(7)

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 刚察县| 松溪县| 百色市| 合江县| 安庆市| 沈阳市| 通江县| 玛纳斯县| 兴和县| 镇江市| 武强县| 澜沧| 资源县| 邵武市| 上饶市| 焉耆| 丹巴县| 常山县| 黎城县| 株洲县| 亳州市| 巩留县| 田林县| 视频| 江山市| 桃源县| 绥滨县| 北流市| 九龙坡区| 广南县| 罗甸县| 台东市| 清水河县| 舒城县| 准格尔旗| 介休市| 威信县| 衡东县| 敖汉旗| 威宁| 永兴县|