SEOIT

          SEO學習

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            6 Posts :: 1 Stories :: 2 Comments :: 0 Trackbacks

           

          這個程序了不得,基本控件全包含進去了。。。真佩服這個程序的作者

            package ch02.section02;

            import javax.swing.*;

            import java.awt.*;

            import java.awt.event.*;

            import javax.swing.tree.*;

            import javax.swing.event.*;

            import javax.swing.border.*;

            import javax.swing.table.*;

            public class SwingTest extends JFrame{

            public SwingTest(){

            MenuTest menuTest=new MenuTest();

            LeftPanel leftPanel=new LeftPanel();

            RightPanel rightPanel=new RightPanel();

            BottomPanel bottomPanel=new BottomPanel();

            CenterPanel centerPanel=new CenterPanel();

            Container c=this.getContentPane();

            this.setJMenuBar(menuTest);

            c.add(leftPanel,BorderLayout.WEST);

            c.add(rightPanel,BorderLayout.EAST);

            c.add(centerPanel,BorderLayout.CENTER);

            c.add(bottomPanel,BorderLayout.SOUTH);

            this.addWindowListener(new WindowAdapter(){

            public void WindowClosing(WindowEvent e){

            dispose();

            System.exit(0);

            }

            });

            setSize(700,500);

            setTitle("Swing 組件大全簡體版");

            setUndecorated(true);

            setLocation(200,150);

            show();

            }

            class MenuTest extends JMenuBar{

            private JDialog aboutDialog;

            public MenuTest(){

            JMenu fileMenu=new JMenu("文件");

            JMenuItem exitMenuItem=new JMenuItem("退出",KeyEvent.VK_E);

            JMenuItem aboutMenuItem=new JMenuItem("關于..",KeyEvent.VK_A);

            fileMenu.add(exitMenuItem);

            fileMenu.add(aboutMenuItem);

            this.add(fileMenu);

            aboutDialog=new JDialog();

            initAboutDialog();

            exitMenuItem.addActionListener(new ActionListener(){

            public void actionPerformed(ActionEvent e){

            dispose();

            System.exit(0);

            }

            });

            aboutMenuItem.addActionListener(new ActionListener(){

            public void actionPerformed(ActionEvent e){

            aboutDialog.show();

            }

            });

            }

          posted on 2009-12-11 23:49 文化 閱讀(4421) 評論(1)  編輯  收藏

          Feedback

          # re: java Swing組件大全超牛的例子 2014-09-23 11:56 zuidaima
          java swing demo源代碼下載:http://zuidaima.com/share_topic/kSwing%E5%92%8CAWT%E5%BC%80%E5%8F%91-p1-s1.htm  回復  更多評論
            


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


          網站導航:
           
          fag進口軸承 nsk進口軸承 timken進口軸承 二水氯化鈣 天津不銹鋼 天津服裝批發 天津裝修 孕婦裝批發 無水氯化鈣 氯化鈣 自動化 融雪劑 防凍液 無水氯化鈣 二水氯化鈣 安卓手機推薦 氯化鈣價格不銹鋼 不銹鋼 淘寶網女裝
          主站蜘蛛池模板: 宁国市| 青河县| 灌南县| 舞钢市| 凤凰县| 偏关县| 巫山县| 绍兴县| 浪卡子县| 安达市| 阜南县| 龙山县| 永平县| 大竹县| 同德县| 台东县| 凤凰县| 洞头县| 台南县| 恩施市| 伊春市| 大余县| 安溪县| 察隅县| 郓城县| 和林格尔县| 新田县| 景德镇市| 遂昌县| 沙雅县| 嘉鱼县| 香格里拉县| 忻州市| 民县| 渭南市| 尼木县| 施秉县| 藁城市| 霸州市| 长宁区| 灌云县|