布局管理器—FlowLayout

          /**
          ?* @(#)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);
          ??? }
          }

          posted on 2007-01-21 11:13 大頭劍客 閱讀(159) 評論(0)  編輯  收藏 所屬分類: 學習筆記

          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          公告

          寫字樓里寫字間,寫字間里程序員;
          程序人員寫程序,又拿程序換酒錢;
          酒醒只在網上坐,酒醉還來網下眠;
          酒醉酒醒日復日,網上網下年復年;
          但愿老死電腦間,不愿鞠躬老板前;
          奔馳寶馬貴者趣,公交自行程序員;
          別人笑我忒瘋癲,我笑自己命太賤;
          不見滿街漂亮妹,哪個歸得程序員.
          不管前面是地雷陣還是萬丈深淵,
          我都將勇往直前,義無反顧,
          鞠躬盡瘁,死而后已。
          —— 朱镕基總理

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章分類

          文章檔案

          學習園地

          最新隨筆

          搜索

          積分與排名

          最新評論

          主站蜘蛛池模板: 牙克石市| 宿迁市| 紫云| 宾阳县| 武宣县| 上饶市| 琼结县| 祁连县| 四子王旗| 鹤庆县| 西昌市| 宜兰县| 凤山市| 米林县| 汨罗市| 鹿邑县| 漳州市| 锡林郭勒盟| 岚皋县| 济宁市| 长岭县| 榆中县| 武夷山市| 阿拉善盟| 久治县| 宝山区| 璧山县| 绥芬河市| 牟定县| 静海县| 成武县| 东兰县| 印江| 如皋市| 江陵县| 老河口市| 博乐市| 湘西| 内丘县| 尼勒克县| 仙游县|