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 文化 閱讀(4427) 評論(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進口軸承 二水氯化鈣 天津不銹鋼 天津服裝批發 天津裝修 孕婦裝批發 無水氯化鈣 氯化鈣 自動化 融雪劑 防凍液 無水氯化鈣 二水氯化鈣 安卓手機推薦 氯化鈣價格不銹鋼 不銹鋼 淘寶網女裝
          主站蜘蛛池模板: 金门县| 青田县| 黔江区| 尚志市| 尤溪县| 平顺县| 西盟| 山东| 高青县| 礼泉县| 天祝| 繁峙县| 永靖县| 墨玉县| 无为县| 衢州市| 兴安县| 虞城县| 阳春市| 华安县| 铁岭县| 佛冈县| 上杭县| 大丰市| 武安市| 水城县| 合水县| 江西省| 景宁| 宣威市| 鹤峰县| 仪征市| 罗江县| 化德县| 濮阳县| 安西县| 山丹县| 青岛市| 韶山市| 镇原县| 墨江|