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

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

?? dialogdemo.java

?? Java樣例程序集合:2D
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
import javax.swing.JOptionPane;import javax.swing.JDialog;import javax.swing.JButton;import javax.swing.JRadioButton;import javax.swing.ButtonGroup;import javax.swing.JLabel;import javax.swing.ImageIcon;import javax.swing.BoxLayout;import javax.swing.Box;import javax.swing.BorderFactory;import javax.swing.border.Border;import javax.swing.JTabbedPane;import javax.swing.JPanel;import javax.swing.JFrame;import java.beans.*; //Property change stuffimport java.awt.*;import java.awt.event.*;/* * DialogDemo.java is a 1.4 application that requires these files: *   CustomDialog.java *   images/middle.gif */public class DialogDemo extends JPanel {    JLabel label;    ImageIcon icon = createImageIcon("images/middle.gif");    JFrame frame;    String simpleDialogDesc = "Some simple message dialogs";    String iconDesc = "A JOptionPane has its choice of icons";    String moreDialogDesc = "Some more dialogs";    CustomDialog customDialog;    /** Creates the GUI shown inside the frame's content pane. */    public DialogDemo(JFrame frame) {        super(new BorderLayout());        this.frame = frame;        customDialog = new CustomDialog(frame, "geisel", this);        customDialog.pack();        //Create the components.        JPanel frequentPanel = createSimpleDialogBox();        JPanel featurePanel = createFeatureDialogBox();        JPanel iconPanel = createIconDialogBox();        label = new JLabel("Click the \"Show it!\" button"                           + " to bring up the selected dialog.",                           JLabel.CENTER);        //Lay them out.        Border padding = BorderFactory.createEmptyBorder(20,20,5,20);        frequentPanel.setBorder(padding);        featurePanel.setBorder(padding);        iconPanel.setBorder(padding);        JTabbedPane tabbedPane = new JTabbedPane();        tabbedPane.addTab("Simple Modal Dialogs", null,                          frequentPanel,                          simpleDialogDesc); //tooltip text        tabbedPane.addTab("More Dialogs", null,                          featurePanel,                          moreDialogDesc); //tooltip text        tabbedPane.addTab("Dialog Icons", null,                          iconPanel,                          iconDesc); //tooltip text        add(tabbedPane, BorderLayout.CENTER);        add(label, BorderLayout.PAGE_END);        label.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));    }    /** Sets the text displayed at the bottom of the frame. */    void setLabel(String newText) {        label.setText(newText);    }    /** Returns an ImageIcon, or null if the path was invalid. */    protected static ImageIcon createImageIcon(String path) {        java.net.URL imgURL = DialogDemo.class.getResource(path);        if (imgURL != null) {            return new ImageIcon(imgURL);        } else {            System.err.println("Couldn't find file: " + path);            return null;        }    }    /** Creates the panel shown by the first tab. */    private JPanel createSimpleDialogBox() {        final int numButtons = 4;        JRadioButton[] radioButtons = new JRadioButton[numButtons];        final ButtonGroup group = new ButtonGroup();        JButton showItButton = null;        final String defaultMessageCommand = "default";        final String yesNoCommand = "yesno";        final String yeahNahCommand = "yeahnah";        final String yncCommand = "ync";        radioButtons[0] = new JRadioButton("OK (in the L&F's words)");        radioButtons[0].setActionCommand(defaultMessageCommand);        radioButtons[1] = new JRadioButton("Yes/No (in the L&F's words)");        radioButtons[1].setActionCommand(yesNoCommand);        radioButtons[2] = new JRadioButton("Yes/No "                      + "(in the programmer's words)");        radioButtons[2].setActionCommand(yeahNahCommand);        radioButtons[3] = new JRadioButton("Yes/No/Cancel "                           + "(in the programmer's words)");        radioButtons[3].setActionCommand(yncCommand);        for (int i = 0; i < numButtons; i++) {            group.add(radioButtons[i]);        }        radioButtons[0].setSelected(true);        showItButton = new JButton("Show it!");        showItButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                String command = group.getSelection().getActionCommand();                //ok dialog                if (command == defaultMessageCommand) {                    JOptionPane.showMessageDialog(frame,                                "Eggs aren't supposed to be green.");                //yes/no dialog                } else if (command == yesNoCommand) {                    int n = JOptionPane.showConfirmDialog(                            frame, "Would you like green eggs and ham?",                            "An Inane Question",                            JOptionPane.YES_NO_OPTION);                    if (n == JOptionPane.YES_OPTION) {                        setLabel("Ewww!");                    } else if (n == JOptionPane.NO_OPTION) {                        setLabel("Me neither!");                    } else {                        setLabel("Come on -- tell me!");                    }                //yes/no (not in those words)                } else if (command == yeahNahCommand) {                    Object[] options = {"Yes, please", "No way!"};                    int n = JOptionPane.showOptionDialog(frame,                                    "Would you like green eggs and ham?",                                    "A Silly Question",                                    JOptionPane.YES_NO_OPTION,                                    JOptionPane.QUESTION_MESSAGE,                                    null,                                    options,                                    options[0]);                    if (n == JOptionPane.YES_OPTION) {                        setLabel("You're kidding!");                    } else if (n == JOptionPane.NO_OPTION) {                        setLabel("I don't like them, either.");                    } else {                        setLabel("Come on -- 'fess up!");                    }                //yes/no/cancel (not in those words)                } else if (command == yncCommand) {                    Object[] options = {"Yes, please",                                        "No, thanks",                                        "No eggs, no ham!"};                    int n = JOptionPane.showOptionDialog(frame,                                    "Would you like some green eggs to go "                                    + "with that ham?",                                    "A Silly Question",                                    JOptionPane.YES_NO_CANCEL_OPTION,                                    JOptionPane.QUESTION_MESSAGE,                                    null,                                    options,                                    options[2]);                    if (n == JOptionPane.YES_OPTION) {                        setLabel("Here you go: green eggs and ham!");                    } else if (n == JOptionPane.NO_OPTION) {                        setLabel("OK, just the ham, then.");                    } else if (n == JOptionPane.CANCEL_OPTION) {                        setLabel("Well, I'm certainly not going to eat them!");                    } else {                        setLabel("Please tell me what you want!");                    }                }                return;            }        });        return createPane(simpleDialogDesc + ":",                          radioButtons,                          showItButton);    }    /**     * Used by createSimpleDialogBox and createFeatureDialogBox     * to create a pane containing a description, a single column     * of radio buttons, and the Show it! button.     */    private JPanel createPane(String description,                              JRadioButton[] radioButtons,                              JButton showButton) {        int numChoices = radioButtons.length;        JPanel box = new JPanel();        JLabel label = new JLabel(description);        box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));        box.add(label);        for (int i = 0; i < numChoices; i++) {            box.add(radioButtons[i]);        }        JPanel pane = new JPanel(new BorderLayout());        pane.add(box, BorderLayout.PAGE_START);        pane.add(showButton, BorderLayout.PAGE_END);        return pane;    }    /**     * Like createPane, but creates a pane with 2 columns of radio     * buttons.  The number of buttons passed in *must* be even.     */     private JPanel create2ColPane(String description,                                  JRadioButton[] radioButtons,                                  JButton showButton) {        JLabel label = new JLabel(description);        int numPerColumn = radioButtons.length/2;        JPanel grid = new JPanel(new GridLayout(0, 2));        for (int i = 0; i < numPerColumn; i++) {            grid.add(radioButtons[i]);            grid.add(radioButtons[i + numPerColumn]);        }        JPanel box = new JPanel();        box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));        box.add(label);        grid.setAlignmentX(0.0f);        box.add(grid);        JPanel pane = new JPanel(new BorderLayout());        pane.add(box, BorderLayout.PAGE_START);        pane.add(showButton, BorderLayout.PAGE_END);        return pane;    }    /*     * Creates the panel shown by the 3rd tab.     * These dialogs are implemented using showMessageDialog, but     * you can specify the icon (using similar code) for any other     * kind of dialog, as well.     */    private JPanel createIconDialogBox() {        JButton showItButton = null;        final int numButtons = 6;        JRadioButton[] radioButtons = new JRadioButton[numButtons];        final ButtonGroup group = new ButtonGroup();        final String plainCommand = "plain";        final String infoCommand = "info";        final String questionCommand = "question";        final String errorCommand = "error";        final String warningCommand = "warning";        final String customCommand = "custom";        radioButtons[0] = new JRadioButton("Plain (no icon)");        radioButtons[0].setActionCommand(plainCommand);        radioButtons[1] = new JRadioButton("Information icon");        radioButtons[1].setActionCommand(infoCommand);        radioButtons[2] = new JRadioButton("Question icon");        radioButtons[2].setActionCommand(questionCommand);        radioButtons[3] = new JRadioButton("Error icon");        radioButtons[3].setActionCommand(errorCommand);        radioButtons[4] = new JRadioButton("Warning icon");        radioButtons[4].setActionCommand(warningCommand);        radioButtons[5] = new JRadioButton("Custom icon");        radioButtons[5].setActionCommand(customCommand);        for (int i = 0; i < numButtons; i++) {            group.add(radioButtons[i]);        }        radioButtons[0].setSelected(true);        showItButton = new JButton("Show it!");        showItButton.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                String command = group.getSelection().getActionCommand();                //no icon                if (command == plainCommand) {                    JOptionPane.showMessageDialog(frame,                                    "Eggs aren't supposed to be green.",

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看国产精品网站| 7777精品伊人久久久大香线蕉最新版 | 久久99精品久久久久久久久久久久| 国产午夜亚洲精品羞羞网站| 欧美日韩精品二区第二页| 国产成人啪免费观看软件| 日韩不卡手机在线v区| 亚洲免费观看视频| 国产三级精品在线| 欧美成人三级在线| 欧美理论电影在线| 99久久久久久99| 国产一区二区三区免费观看| 人禽交欧美网站| 亚洲国产毛片aaaaa无费看| 国产精品电影一区二区| 2021中文字幕一区亚洲| 3d动漫精品啪啪一区二区竹菊| 91蝌蚪porny| 国产a久久麻豆| 国产一区二区福利视频| 青椒成人免费视频| 午夜欧美视频在线观看 | 国产亚洲短视频| 日韩欧美一区中文| 在线综合亚洲欧美在线视频| 欧美视频一区二区三区在线观看 | 日产国产高清一区二区三区| 免费观看在线综合色| 尤物av一区二区| 一区二区在线看| 亚洲视频一二三区| 国产精品不卡一区| 欧美国产亚洲另类动漫| 欧美经典一区二区| 中文在线一区二区| 国产日韩欧美高清在线| 亚洲国产成人私人影院tom| 欧美r级电影在线观看| 精品国产不卡一区二区三区| 日韩一区二区三区精品视频| 91.com在线观看| 91精品麻豆日日躁夜夜躁| 91精品国产欧美一区二区18| 制服丝袜成人动漫| 欧美电影免费观看完整版 | 伊人一区二区三区| 亚洲欧美日韩国产中文在线| 亚洲精品乱码久久久久| 亚洲一区二区高清| 日本不卡视频一二三区| 美腿丝袜亚洲色图| 国产精品18久久久久久vr| 国产精品996| 不卡一二三区首页| 色婷婷综合久久久中文一区二区| 日本黄色一区二区| 欧美日韩小视频| 日韩一区二区在线看| 久久亚洲欧美国产精品乐播| 国产精品免费丝袜| 亚洲主播在线播放| 蜜臀av一级做a爰片久久| 国产在线国偷精品产拍免费yy| 国产成人鲁色资源国产91色综| 成人激情av网| 欧美视频一二三区| 久久综合久久鬼色中文字| 中文字幕 久热精品 视频在线| 一区二区三区电影在线播| 日韩电影一区二区三区四区| 国产不卡免费视频| 欧美制服丝袜第一页| 欧美大片在线观看一区| 中文字幕中文字幕在线一区| 视频一区二区三区在线| 国产一区二区三区电影在线观看| 91污片在线观看| 欧美一级黄色大片| 国产精品第一页第二页第三页| 亚洲成人午夜影院| 国产麻豆成人传媒免费观看| 日本韩国视频一区二区| 精品噜噜噜噜久久久久久久久试看 | 一本大道av伊人久久综合| 日韩三级中文字幕| 国产精品传媒入口麻豆| 蜜臀a∨国产成人精品| 99r国产精品| 精品三级在线观看| 日本不卡123| 成人久久视频在线观看| 欧美一区二区免费视频| 亚洲精品视频自拍| 国产一区二区h| 欧美猛男超大videosgay| 中文在线一区二区| 久久国产精品区| 欧美午夜精品一区| 国产精品网站在线播放| 蜜桃91丨九色丨蝌蚪91桃色| 91电影在线观看| 国产欧美综合色| 日本最新不卡在线| 色天使色偷偷av一区二区| 久久美女高清视频| 午夜精品成人在线视频| 99精品国产99久久久久久白柏| 欧美成人三级在线| 亚洲成人tv网| 在线亚洲一区二区| 国产精品乱码人人做人人爱| 精品无码三级在线观看视频 | 欧美国产乱子伦 | 成人av网站免费观看| www激情久久| 麻豆精品精品国产自在97香蕉| 欧美体内she精视频| 亚洲精品一卡二卡| 91网站在线观看视频| 国产欧美视频在线观看| 国产伦精品一区二区三区视频青涩 | 午夜精品福利一区二区三区蜜桃| 91在线观看一区二区| 欧美国产成人精品| 国产激情视频一区二区三区欧美| 精品国产乱码久久| 极品少妇xxxx精品少妇| 日韩欧美国产一区二区在线播放 | 波多野结衣视频一区| 国产丝袜欧美中文另类| 国产一区二区三区免费看| 精品久久国产字幕高潮| 看电影不卡的网站| 日韩欧美在线影院| 另类人妖一区二区av| 欧美一区二区国产| 日本最新不卡在线| 精品久久久久一区| 国产一区二区在线观看免费| 久久麻豆一区二区| 国产ts人妖一区二区| 国产精品国产三级国产aⅴ中文| 国产.欧美.日韩| 国产精品国产精品国产专区不蜜 | 成人91在线观看| 椎名由奈av一区二区三区| 99久久婷婷国产精品综合| 亚洲欧美另类久久久精品| 91久久精品一区二区三| 亚洲国产美国国产综合一区二区| 欧美人狂配大交3d怪物一区 | 91网站视频在线观看| 亚洲免费观看高清完整版在线观看 | 国产精品久久久久久久久快鸭 | 日韩一区二区中文字幕| 精品伊人久久久久7777人| 国产三级精品在线| 91社区在线播放| 性欧美疯狂xxxxbbbb| 精品剧情v国产在线观看在线| 国产精品一级在线| 国产精品成人网| 欧美日韩精品一区二区三区 | 亚洲高清不卡在线观看| 日韩一区二区麻豆国产| 国产成人三级在线观看| 亚洲精品国产a久久久久久 | 国产肉丝袜一区二区| 91视频在线观看免费| 午夜久久久久久久久久一区二区| 精品久久五月天| 波多野结衣在线aⅴ中文字幕不卡| 亚洲线精品一区二区三区八戒| 日韩一级片在线观看| 国产91色综合久久免费分享| 亚洲精品国产品国语在线app| 欧美xingq一区二区| 91香蕉视频mp4| 毛片不卡一区二区| 亚洲日本在线天堂| 精品久久久久久久久久久院品网| 97久久超碰精品国产| 老色鬼精品视频在线观看播放| 国产精品嫩草99a| 日韩天堂在线观看| 不卡视频在线观看| 精品在线你懂的| 亚洲国产美国国产综合一区二区| 免费三级欧美电影| 亚洲男女毛片无遮挡| 日韩欧美视频在线| 欧美在线观看你懂的| 岛国av在线一区| 免费成人av在线| 洋洋av久久久久久久一区| 国产视频不卡一区| 日韩视频在线永久播放| 91福利视频在线| 粉嫩嫩av羞羞动漫久久久|