亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? modalitydemo.java

?? java tutorial.sun公司官方出品。java入門書籍。最新版
?? JAVA
字號:
/* * Copyright (c) 1995 - 2008 Sun Microsystems, Inc.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * *   - Redistributions of source code must retain the above copyright *     notice, this list of conditions and the following disclaimer. * *   - Redistributions in binary form must reproduce the above copyright *     notice, this list of conditions and the following disclaimer in the *     documentation and/or other materials provided with the distribution. * *   - Neither the name of Sun Microsystems nor the names of its *     contributors may be used to endorse or promote products derived *     from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package misc;/* * ModalityDemo.java * */import java.awt.*;import java.awt.event.*;import java.awt.font.*;import javax.swing.*;public class ModalityDemo {        // first document: frame, modeless dialog, document-modal dialog    private JFrame f1;    private JDialog d2;    private JDialog d3;        // second document: frame, modeless dialog, document-modal dialog    private JFrame f4;    private JDialog d5;    private JDialog d6;        // third document: modal excluded frame    private JFrame f7;        // fourth document: frame, file dialog (application-modal)    private JFrame f8;        // radiobuttons in f1    JRadioButton rb11, rb12, rb13;    // text field in d2    JTextField tf2;        // label in d3    JLabel l3;        // radiobuttons in f4    JRadioButton rb41, rb42, rb43;    // text field in d5    JTextField tf5;        // label in d6    JLabel l6;        // radiobuttons in f7    JRadioButton rb71, rb72, rb73;       public static void main(String[] args) {        /* Use an appropriate Look and Feel */        try {            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");            UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");        } catch (UnsupportedLookAndFeelException ex) {            ex.printStackTrace();        } catch (IllegalAccessException ex) {            ex.printStackTrace();        } catch (InstantiationException ex) {            ex.printStackTrace();        } catch (ClassNotFoundException ex) {            ex.printStackTrace();        }        /* Turn off metal's use of bold fonts */        UIManager.put("swing.boldMetal", Boolean.FALSE);                //Schedule a job for the event-dispatching thread:        //creating and showing this application's GUI.        SwingUtilities.invokeLater(new Runnable() {            public void run() {                ModalityDemo md = new ModalityDemo();                md.createAndShowGUI();                md.start();            }        });    }        //start frames    private void start() {        f1.setVisible(true);        f4.setVisible(true);        f7.setVisible(true);        f8.setVisible(true);    }        private static WindowListener closeWindow = new WindowAdapter() {        public void windowClosing(WindowEvent e) {            e.getWindow().dispose();        }    };        /**     * Create the GUI and show it.  For thread safety,     * this method is invoked from the     * event-dispatching thread.     */    private void createAndShowGUI(){        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();        GraphicsDevice gd = ge.getDefaultScreenDevice();        GraphicsConfiguration gc = gd.getDefaultConfiguration();        Insets ins = Toolkit.getDefaultToolkit().getScreenInsets(gc);        int sw = gc.getBounds().width - ins.left - ins.right;        int sh = gc.getBounds().height - ins.top - ins.bottom;                // first document                // frame f1                f1 = new JFrame("Book 1 (parent frame)");        f1.setBounds(32, 32, 300, 200);        f1.addWindowListener(closeWindow);        // create radio buttons        rb11 = new JRadioButton("Biography", true);        rb12 = new JRadioButton("Funny tale", false);        rb13 = new JRadioButton("Sonnets", false);        // place radio buttons into a single group        ButtonGroup bg1 = new ButtonGroup();        bg1.add(rb11);        bg1.add(rb12);        bg1.add(rb13);        JButton b1 = new JButton("OK");        b1.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                // get label of selected radiobutton                String title = null;                if (rb11.isSelected()) {                    title = rb11.getText();                } else if (rb12.isSelected()) {                    title = rb12.getText();                } else {                    title = rb13.getText();                }                // prepend radio button label to dialogs' titles                d2.setTitle(title + " (modeless dialog)");                d3.setTitle(title + " (document-modal dialog)");                d2.setVisible(true);            }        });        Container cp1 = f1.getContentPane();        // create three containers to improve layouting        cp1.setLayout(new GridLayout(1, 3));        // an empty container        Container cp11 = new Container();        // a container to layout components        Container cp12 = new Container();        // an empty container        Container cp13 = new Container();        // add a button into a separate panel        JPanel p1 = new JPanel();        p1.setLayout(new FlowLayout());        p1.add(b1);        // add radio buttons and the OK button one after another into a single column        cp12.setLayout(new GridLayout(4, 1));        cp12.add(rb11);        cp12.add(rb12);        cp12.add(rb13);        cp12.add(p1);        // add three containers        cp1.add(cp11);        cp1.add(cp12);        cp1.add(cp13);                // dialog d2                d2 = new JDialog(f1);        d2.setBounds(132, 132, 300, 200);        d2.addWindowListener(closeWindow);        JLabel l2 = new JLabel("Enter your name: ");        l2.setHorizontalAlignment(SwingConstants.CENTER);        tf2 = new JTextField(12);        JButton b2 = new JButton("OK");        b2.setHorizontalAlignment(SwingConstants.CENTER);        b2.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                //pass a name into the document modal dialog                l3.setText("by " + tf2.getText());                d3.setVisible(true);            }        });        Container cp2 = d2.getContentPane();        // add label, text field and button one after another into a single column        cp2.setLayout(new BorderLayout());        cp2.add(l2, BorderLayout.NORTH);        cp2.add(tf2, BorderLayout.CENTER);        JPanel p2 = new JPanel();        p2.setLayout(new FlowLayout());        p2.add(b2);        cp2.add(p2, BorderLayout.SOUTH);                        // dialog d3                d3 = new JDialog(d2, "", Dialog.ModalityType.DOCUMENT_MODAL);        d3.setBounds(232, 232, 300, 200);        d3.addWindowListener(closeWindow);        JTextArea ta3 = new JTextArea();        l3 = new JLabel();        l3.setHorizontalAlignment(SwingConstants.RIGHT);        Container cp3 = d3.getContentPane();        cp3.setLayout(new BorderLayout());        cp3.add(new JScrollPane(ta3), BorderLayout.CENTER);        JPanel p3 = new JPanel();        p3.setLayout(new FlowLayout(FlowLayout.RIGHT));        p3.add(l3);        cp3.add(p3, BorderLayout.SOUTH);                // second document                // frame f4                f4 = new JFrame("Book 2 (parent frame)");        f4.setBounds(sw - 300 - 32, 32, 300, 200);        f4.addWindowListener(closeWindow);        // create radio buttons        rb41 = new JRadioButton("Biography", true);        rb42 = new JRadioButton("Funny tale", false);        rb43 = new JRadioButton("Sonnets", false);        // place radio buttons into a single group        ButtonGroup bg4 = new ButtonGroup();        bg4.add(rb41);        bg4.add(rb42);        bg4.add(rb43);        JButton b4 = new JButton("OK");        b4.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                // get label of selected radiobutton                String title = null;                if (rb41.isSelected()) {                    title = rb41.getText();                } else if (rb42.isSelected()) {                    title = rb42.getText();                } else {                    title = rb43.getText();                }                // prepend radiobutton label to dialogs' titles                d5.setTitle(title + " (modeless dialog)");                d6.setTitle(title + " (document-modal dialog)");                d5.setVisible(true);            }        });        Container cp4 = f4.getContentPane();        // create three containers to improve layouting        cp4.setLayout(new GridLayout(1, 3));        Container cp41 = new Container();        Container cp42 = new Container();        Container cp43 = new Container();        // add the button into a separate panel        JPanel p4 = new JPanel();        p4.setLayout(new FlowLayout());        p4.add(b4);        // add radiobuttons and the OK button one after another into a single column        cp42.setLayout(new GridLayout(4, 1));        cp42.add(rb41);        cp42.add(rb42);        cp42.add(rb43);        cp42.add(p4);        //add three containers        cp4.add(cp41);        cp4.add(cp42);        cp4.add(cp43);                // dialog d5                d5 = new JDialog(f4);        d5.setBounds(sw - 400 - 32, 132, 300, 200);        d5.addWindowListener(closeWindow);        JLabel l5 = new JLabel("Enter your name: ");        l5.setHorizontalAlignment(SwingConstants.CENTER);        tf5 = new JTextField(12);        tf5.setHorizontalAlignment(SwingConstants.CENTER);        JButton b5 = new JButton("OK");        b5.setHorizontalAlignment(SwingConstants.CENTER);        b5.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                //pass a name into the document modal dialog                l6.setText("by " + tf5.getText());                d6.setVisible(true);            }        });        Container cp5 = d5.getContentPane();        // add label, text field and button one after another into a single column        cp5.setLayout(new BorderLayout());        cp5.add(l5, BorderLayout.NORTH);        cp5.add(tf5, BorderLayout.CENTER);        JPanel p5 = new JPanel();        p5.setLayout(new FlowLayout());        p5.add(b5);        cp5.add(p5, BorderLayout.SOUTH);                // dialog d6                d6 = new JDialog(d5, "", Dialog.ModalityType.DOCUMENT_MODAL);        d6.setBounds(sw - 500 - 32, 232, 300, 200);        d6.addWindowListener(closeWindow);        JTextArea ta6 = new JTextArea();        l6 = new JLabel();        l6.setHorizontalAlignment(SwingConstants.RIGHT);        Container cp6 = d6.getContentPane();        cp6.setLayout(new BorderLayout());        cp6.add(new JScrollPane(ta6), BorderLayout.CENTER);        JPanel p6 = new JPanel();        p6.setLayout(new FlowLayout(FlowLayout.RIGHT));        p6.add(l6);        cp6.add(p6, BorderLayout.SOUTH);                        // third document                // frame f7                f7 = new JFrame("Classics (excluded frame)");        f7.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);        f7.setBounds(32, sh - 200 - 32, 300, 200);        f7.addWindowListener(closeWindow);        JLabel l7 = new JLabel("Famous writers: ");        l7.setHorizontalAlignment(SwingConstants.CENTER);        // create radio buttons        rb71 = new JRadioButton("Burns", true);        rb72 = new JRadioButton("Dickens", false);        rb73 = new JRadioButton("Twain", false);        // place radio buttons into a single group        ButtonGroup bg7 = new ButtonGroup();        bg7.add(rb71);        bg7.add(rb72);        bg7.add(rb73);        Container cp7 = f7.getContentPane();        // create three containers to improve layouting        cp7.setLayout(new GridLayout(1, 3));        Container cp71 = new Container();        Container cp72 = new Container();        Container cp73 = new Container();        // add the label into a separate panel        JPanel p7 = new JPanel();        p7.setLayout(new FlowLayout());        p7.add(l7);        // add a label and radio buttons one after another into a single column        cp72.setLayout(new GridLayout(4, 1));        cp72.add(p7);        cp72.add(rb71);        cp72.add(rb72);        cp72.add(rb73);        // add three containers        cp7.add(cp71);        cp7.add(cp72);        cp7.add(cp73);                // fourth document                // frame f8                f8 = new JFrame("Feedback (parent frame)");        f8.setBounds(sw - 300 - 32, sh - 200 - 32, 300, 200);        f8.addWindowListener(closeWindow);        JButton b8 = new JButton("Rate yourself");        b8.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                JOptionPane.showConfirmDialog(null,                        "I really like my book",                        "Question (application-modal dialog)",                        JOptionPane.YES_NO_OPTION,                        JOptionPane.QUESTION_MESSAGE);            }        });        Container cp8 = f8.getContentPane();        cp8.setLayout(new FlowLayout(FlowLayout.CENTER, 8, 8));        cp8.add(b8);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久综合激的五月天| 亚洲午夜视频在线| 亚洲一二三四在线| 国产中文一区二区三区| 在线观看日韩精品| 国产精品你懂的在线欣赏| 麻豆精品久久久| 欧美一二三在线| 亚洲欧洲无码一区二区三区| 久久国产精品第一页| 欧美性xxxxxxxx| 国产精品素人视频| 国产精品影视天天线| 制服丝袜日韩国产| 亚洲一区二区三区四区五区中文| 成人av午夜影院| 国产亚洲人成网站| 久久精品国产精品亚洲综合| 欧美久久婷婷综合色| 亚洲女厕所小便bbb| 成人白浆超碰人人人人| 精品美女在线播放| 久久爱www久久做| 日韩一区二区麻豆国产| 日本不卡视频在线| 欧美一级一级性生活免费录像| 婷婷国产在线综合| 欧美日韩电影一区| 亚洲va欧美va国产va天堂影院| 91麻豆国产福利在线观看| **网站欧美大片在线观看| 国产99久久久国产精品免费看| 久久一二三国产| 狠狠久久亚洲欧美| 久久综合九色综合97婷婷 | 亚洲国产你懂的| 一本一本大道香蕉久在线精品| 久久久久久久久久电影| 国产精品456| 国产精品免费视频观看| 97se狠狠狠综合亚洲狠狠| 亚洲欧洲精品一区二区精品久久久| 国产成人精品一区二区三区四区| 中文字幕免费不卡在线| 色综合激情久久| 亚洲成人av中文| 日韩视频永久免费| 国产成人a级片| 成人欧美一区二区三区在线播放| 色先锋久久av资源部| 亚洲国产日韩综合久久精品| 欧美一级日韩不卡播放免费| 国产尤物一区二区| 中文字幕日韩精品一区| 在线免费观看日本一区| 美女高潮久久久| 国产精品久久久久久久久搜平片| 色播五月激情综合网| 日韩精品成人一区二区三区| 久久亚洲精精品中文字幕早川悠里 | 国产精品久久免费看| 色婷婷久久一区二区三区麻豆| 五月激情综合网| 久久精品一级爱片| 色偷偷久久一区二区三区| 视频一区中文字幕| 日本一区免费视频| 欧美人妇做爰xxxⅹ性高电影| 麻豆久久一区二区| 亚洲人成网站在线| 日韩欧美中文字幕一区| av一区二区三区在线| 丝袜国产日韩另类美女| 国产精品午夜电影| 91精品国产麻豆| 成人黄色免费短视频| 五月天久久比比资源色| 国产精品久久久久天堂| 日韩视频一区在线观看| 色国产综合视频| 国产高清久久久久| 日韩黄色片在线观看| 国产精品进线69影院| 日韩无一区二区| 欧美亚洲综合色| caoporen国产精品视频| 黄网站免费久久| 日韩专区在线视频| 亚洲日本一区二区三区| 久久久久99精品国产片| 欧美电视剧在线看免费| 日产国产高清一区二区三区| 国产精品国产自产拍高清av | 1区2区3区国产精品| 精品三级av在线| 56国语精品自产拍在线观看| aa级大片欧美| 高清日韩电视剧大全免费| 视频一区二区国产| 亚洲大尺度视频在线观看| 国产精品全国免费观看高清| 亚洲精品一区二区三区精华液| 欧美人牲a欧美精品| 欧美视频一区在线观看| 91国产视频在线观看| av一二三不卡影片| 成人高清视频在线| 成人免费视频caoporn| 国产成人精品三级麻豆| 激情六月婷婷久久| 国产精品原创巨作av| 国产一区欧美二区| 久久不见久久见免费视频1| 免费人成网站在线观看欧美高清| 午夜精品123| 日日夜夜免费精品| 美女爽到高潮91| 狠狠色丁香久久婷婷综| 国产剧情在线观看一区二区| 国产成人av福利| 成人av在线电影| 色一情一伦一子一伦一区| 在线亚洲精品福利网址导航| 欧美色综合天天久久综合精品| 色美美综合视频| 欧美日韩视频在线第一区| 91精品国产入口| 国产婷婷色一区二区三区在线| 中文字幕国产一区二区| 亚洲免费av在线| 日韩成人一级大片| 激情小说欧美图片| 成人av在线资源网站| 色妞www精品视频| 在线不卡a资源高清| 精品久久久久99| 亚洲图片你懂的| 午夜激情一区二区三区| 久久国产婷婷国产香蕉| 成人sese在线| 91精品午夜视频| 久久久精品黄色| 亚洲欧美另类图片小说| 日日夜夜免费精品视频| 国产91精品免费| 欧美视频中文字幕| 精品少妇一区二区三区免费观看 | 石原莉奈一区二区三区在线观看| 久久99精品国产91久久来源| 大尺度一区二区| 欧美中文字幕一区二区三区 | 日韩美女视频在线| 国产精品人成在线观看免费| 午夜精品福利一区二区蜜股av| 国产一区二区三区四区在线观看| 91欧美一区二区| 精品日韩成人av| 亚洲老妇xxxxxx| 国产精品综合网| 欧美日韩夫妻久久| 国产精品天干天干在线综合| 视频一区视频二区在线观看| 99久久精品国产麻豆演员表| 日韩欧美色电影| 亚洲日本青草视频在线怡红院| 久久99精品国产麻豆婷婷洗澡| 欧美亚洲愉拍一区二区| 国产欧美一区二区精品性色超碰| 午夜免费欧美电影| 成人h动漫精品一区二| 精品久久久久久久久久久久久久久| 一区二区在线观看视频| 国产成人超碰人人澡人人澡| 欧美一区二区三区在线观看| √…a在线天堂一区| 狠狠网亚洲精品| 日韩一区二区视频| 亚洲一区在线视频观看| 91在线免费播放| 国产欧美日韩综合| 捆绑变态av一区二区三区| 欧美影院午夜播放| 国产精品国产三级国产| 国产综合色产在线精品| 日韩欧美中文字幕制服| 亚洲1区2区3区视频| 91国在线观看| 亚洲欧美另类图片小说| 99re热视频这里只精品| 亚洲国产精品精华液2区45| 国产一区二区视频在线| 日韩欧美国产一区在线观看| 亚洲午夜电影网| 在线观看视频91| 亚洲综合免费观看高清完整版在线 | 国产制服丝袜一区| 精品久久国产字幕高潮| 麻豆精品视频在线观看视频| 欧美男女性生活在线直播观看| 亚洲一区二区三区激情|