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 on 2006-12-21 20:04 悠揚---靖寶華 閱讀(312) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

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

          常用鏈接

          留言簿(1)

          隨筆檔案(7)

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 大关县| 于都县| 金阳县| 清河县| 韩城市| 武城县| 平江县| 丁青县| 乐亭县| 马鞍山市| 兴安县| 兴义市| 安顺市| 黄冈市| 灵宝市| 柘城县| 商水县| 随州市| 广昌县| 龙泉市| 安阳县| 怀宁县| 和静县| 上高县| 长治县| 龙州县| 古交市| 兴宁市| 东城区| 松江区| 红安县| 桓仁| 石台县| 廉江市| 贵德县| 扬中市| 田东县| 潮州市| 从化市| 柳江县| 团风县|