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

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

?? dialogdemo.java

?? java tutotrials or beginners
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        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.",                                    "A plain message",                                    JOptionPane.PLAIN_MESSAGE);                //information icon                } else if (command == infoCommand) {                    JOptionPane.showMessageDialog(frame,                                    "Eggs aren't supposed to be green.",                                    "Inane informational dialog",                                    JOptionPane.INFORMATION_MESSAGE);            //XXX: It doesn't make sense to make a question with            //XXX: only one button.            //XXX: See "Yes/No (but not in those words)" for a better solution.                //question icon                } else if (command == questionCommand) {                    JOptionPane.showMessageDialog(frame,                                    "You shouldn't use a message dialog "                                    + "(like this)\n"                                    + "for a question, OK?",                                    "Inane question",                                    JOptionPane.QUESTION_MESSAGE);                //error icon                } else if (command == errorCommand) {                    JOptionPane.showMessageDialog(frame,                                    "Eggs aren't supposed to be green.",                                    "Inane error",                                    JOptionPane.ERROR_MESSAGE);                //warning icon                } else if (command == warningCommand) {                    JOptionPane.showMessageDialog(frame,                                    "Eggs aren't supposed to be green.",                                    "Inane warning",                                    JOptionPane.WARNING_MESSAGE);                //custom icon                } else if (command == customCommand) {                    JOptionPane.showMessageDialog(frame,                                    "Eggs aren't supposed to be green.",                                    "Inane custom dialog",                                    JOptionPane.INFORMATION_MESSAGE,                                    icon);                }            }        });        return create2ColPane(iconDesc + ":",                              radioButtons,                              showItButton);    }    /** Creates the panel shown by the second tab. */    private JPanel createFeatureDialogBox() {        final int numButtons = 5;        JRadioButton[] radioButtons = new JRadioButton[numButtons];        final ButtonGroup group = new ButtonGroup();        JButton showItButton = null;        final String pickOneCommand = "pickone";        final String textEnteredCommand = "textfield";        final String nonAutoCommand = "nonautooption";        final String customOptionCommand = "customoption";        final String nonModalCommand = "nonmodal";        radioButtons[0] = new JRadioButton("Pick one of several choices");        radioButtons[0].setActionCommand(pickOneCommand);        radioButtons[1] = new JRadioButton("Enter some text");        radioButtons[1].setActionCommand(textEnteredCommand);        radioButtons[2] = new JRadioButton("Non-auto-closing dialog");        radioButtons[2].setActionCommand(nonAutoCommand);        radioButtons[3] = new JRadioButton("Input-validating dialog "                                           + "(with custom message area)");        radioButtons[3].setActionCommand(customOptionCommand);        radioButtons[4] = new JRadioButton("Non-modal dialog");        radioButtons[4].setActionCommand(nonModalCommand);        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();                //pick one of many                if (command == pickOneCommand) {                    Object[] possibilities = {"ham", "spam", "yam"};                    String s = (String)JOptionPane.showInputDialog(                                        frame,                                        "Complete the sentence:\n"                                        + "\"Green eggs and...\"",                                        "Customized Dialog",                                        JOptionPane.PLAIN_MESSAGE,                                        icon,                                        possibilities,                                        "ham");                    //If a string was returned, say so.                    if ((s != null) && (s.length() > 0)) {                        setLabel("Green eggs and... " + s + "!");                        return;                    }                    //If you're here, the return value was null/empty.                    setLabel("Come on, finish the sentence!");                //text input                } else if (command == textEnteredCommand) {                    String s = (String)JOptionPane.showInputDialog(                                        frame,                                        "Complete the sentence:\n"                                        + "\"Green eggs and...\"",                                        "Customized Dialog",                                        JOptionPane.PLAIN_MESSAGE,                                        icon,                                        null,                                        "ham");                    //If a string was returned, say so.                    if ((s != null) && (s.length() > 0)) {                        setLabel("Green eggs and... " + s + "!");                        return;                    }                    //If you're here, the return value was null/empty.                    setLabel("Come on, finish the sentence!");                //non-auto-closing dialog                } else if (command == nonAutoCommand) {                    final JOptionPane optionPane = new JOptionPane(                                    "The only way to close this dialog is by\n"                                    + "pressing one of the following buttons.\n"                                    + "Do you understand?",                                    JOptionPane.QUESTION_MESSAGE,                                    JOptionPane.YES_NO_OPTION);                    //You can't use pane.createDialog() because that                    //method sets up the JDialog with a property change                    //listener that automatically closes the window                    //when a button is clicked.                    final JDialog dialog = new JDialog(frame,                                                 "Click a button",                                                 true);                    dialog.setContentPane(optionPane);                    dialog.setDefaultCloseOperation(                        JDialog.DO_NOTHING_ON_CLOSE);                    dialog.addWindowListener(new WindowAdapter() {                        public void windowClosing(WindowEvent we) {                            setLabel("Thwarted user attempt to close window.");                        }                    });                    optionPane.addPropertyChangeListener(                        new PropertyChangeListener() {                            public void propertyChange(PropertyChangeEvent e) {                                String prop = e.getPropertyName();                                if (dialog.isVisible()                                 && (e.getSource() == optionPane)                                 && (JOptionPane.VALUE_PROPERTY.equals(prop))) {                                    //If you were going to check something                                    //before closing the window, you'd do                                    //it here.                                    dialog.setVisible(false);                                }                            }                        });                    dialog.pack();                    dialog.setLocationRelativeTo(frame);                    dialog.setVisible(true);                    int value = ((Integer)optionPane.getValue()).intValue();                    if (value == JOptionPane.YES_OPTION) {                        setLabel("Good.");                    } else if (value == JOptionPane.NO_OPTION) {                        setLabel("Try using the window decorations "                                 + "to close the non-auto-closing dialog. "                                 + "You can't!");                    } else {                        setLabel("Window unavoidably closed (ESC?).");                    }                //non-auto-closing dialog with custom message area                //NOTE: if you don't intend to check the input,                //then just use showInputDialog instead.                } else if (command == customOptionCommand) {                    customDialog.setLocationRelativeTo(frame);                    customDialog.setVisible(true);                    String s = customDialog.getValidatedText();                    if (s != null) {                        //The text is valid.                        setLabel("Congratulations!  "                                 + "You entered \""                                 + s                                 + "\".");                    }                //non-modal dialog                } else if (command == nonModalCommand) {                    //Create the dialog.                    final JDialog dialog = new JDialog(frame,                                                       "A Non-Modal Dialog");                    //Add contents to it. It must have a close button,                    //since some L&Fs (notably Java/Metal) don't provide one                    //in the window decorations for dialogs.                    JLabel label = new JLabel("<html><p align=center>"                        + "This is a non-modal dialog.<br>"                        + "You can have one or more of these up<br>"                        + "and still use the main window.");                    label.setHorizontalAlignment(JLabel.CENTER);                    Font font = label.getFont();                    label.setFont(label.getFont().deriveFont(font.PLAIN,                                                             14.0f));                    JButton closeButton = new JButton("Close");                    closeButton.addActionListener(new ActionListener() {                        public void actionPerformed(ActionEvent e) {                            dialog.setVisible(false);                            dialog.dispose();                        }                    });                    JPanel closePanel = new JPanel();                    closePanel.setLayout(new BoxLayout(closePanel,                                                       BoxLayout.LINE_AXIS));                    closePanel.add(Box.createHorizontalGlue());                    closePanel.add(closeButton);                    closePanel.setBorder(BorderFactory.                        createEmptyBorder(0,0,5,5));                    JPanel contentPane = new JPanel(new BorderLayout());                    contentPane.add(label, BorderLayout.CENTER);                    contentPane.add(closePanel, BorderLayout.PAGE_END);                    contentPane.setOpaque(true);                    dialog.setContentPane(contentPane);                    //Show it.                    dialog.setSize(new Dimension(300, 150));                    dialog.setLocationRelativeTo(frame);                    dialog.setVisible(true);                }            }        });        return createPane(moreDialogDesc + ":",                          radioButtons,                          showItButton);    }    /**     * Create the GUI and show it.  For thread safety,     * this method should be invoked from the     * event-dispatching thread.     */    private static void createAndShowGUI() {        //Create and set up the window.        JFrame frame = new JFrame("DialogDemo");        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        //Create and set up the content pane.        DialogDemo newContentPane = new DialogDemo(frame);        newContentPane.setOpaque(true); //content panes must be opaque        frame.setContentPane(newContentPane);        //Display the window.        frame.pack();        frame.setVisible(true);    }    public static void main(String[] args) {        //Schedule a job for the event-dispatching thread:        //creating and showing this application's GUI.        javax.swing.SwingUtilities.invokeLater(new Runnable() {            public void run() {                createAndShowGUI();            }        });    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区欧美| 亚洲女人小视频在线观看| 成人午夜电影网站| 亚洲午夜三级在线| 2024国产精品| 欧美日韩国产综合一区二区三区 | 国产精品亚洲专一区二区三区| 亚洲天堂2014| 精品国产一区二区国模嫣然| 91国偷自产一区二区开放时间| 国产综合色在线| 亚洲午夜三级在线| 亚洲同性gay激情无套| 久久久久88色偷偷免费| 欧美丰满少妇xxxbbb| 99久久精品免费看国产免费软件| 蜜臀精品久久久久久蜜臀| 樱桃视频在线观看一区| 日本一区二区视频在线观看| 欧美一级爆毛片| 在线一区二区视频| 国产成人亚洲综合a∨婷婷| 偷拍与自拍一区| 一个色综合av| 日韩美女久久久| 欧美激情中文字幕一区二区| 欧美一区二区免费| 99久久99久久免费精品蜜臀| 国产精品一区二区免费不卡| 久久99国内精品| 麻豆freexxxx性91精品| 亚洲国产精品影院| 亚洲一本大道在线| 91精品国产综合久久久久久久久久 | 欧洲一区二区三区在线| 成人国产精品免费观看| 国产一区二区三区免费在线观看| 国产精品动漫网站| 国产日韩v精品一区二区| 国产精品综合网| 奇米影视一区二区三区| 一区二区欧美视频| 亚洲国产精品一区二区www| 亚洲国产综合在线| 偷拍一区二区三区| 人人精品人人爱| 蓝色福利精品导航| 激情综合网最新| 国产精品亚洲第一区在线暖暖韩国 | 欧美体内she精高潮| 在线免费亚洲电影| 欧美午夜影院一区| 欧美人妇做爰xxxⅹ性高电影| 欧美午夜精品电影| 欧美老人xxxx18| 日韩一区二区免费电影| 日韩欧美不卡在线观看视频| 欧美videos大乳护士334| 日韩一级黄色大片| 久久婷婷国产综合国色天香| 国产精品欧美久久久久无广告| 中文字幕一区三区| 亚洲一区二区中文在线| 午夜婷婷国产麻豆精品| 久久国产尿小便嘘嘘尿| 国内精品嫩模私拍在线| av中文字幕亚洲| 欧美亚洲国产一区二区三区va| 欧美日韩精品系列| 精品久久人人做人人爰| 日本一区二区三区久久久久久久久不 | 亚洲午夜电影在线| 日产国产高清一区二区三区| 国内精品视频666| 成人av电影在线网| 欧美少妇bbb| 精品久久久影院| 国产精品国产三级国产aⅴ原创| 亚洲品质自拍视频| 热久久久久久久| 蜜臀av性久久久久蜜臀av麻豆| 国产精一品亚洲二区在线视频| 91污片在线观看| 欧美一区二区三区免费| 国产精品污www在线观看| 亚洲欧美视频在线观看| 免费观看一级特黄欧美大片| 九九热在线视频观看这里只有精品| eeuss鲁一区二区三区| 欧美一区二区三区不卡| 中文字幕一区二| 日本不卡中文字幕| 97se亚洲国产综合自在线| 日韩美女天天操| 亚洲欧美视频在线观看视频| 国产资源精品在线观看| 欧美日韩精品一二三区| 日韩一区欧美一区| 国产美女精品在线| 在线成人av网站| 亚洲视频在线一区二区| 国产在线不卡一区| 欧美久久一二区| 亚洲精品videosex极品| 国产成a人亚洲| 精品少妇一区二区三区在线视频| 艳妇臀荡乳欲伦亚洲一区| 国产成人精品一区二| 日韩免费视频线观看| 亚洲一二三四区不卡| 波多野结衣在线一区| 日韩欧美久久一区| 亚洲国产精品尤物yw在线观看| av中文字幕亚洲| 91麻豆精品91久久久久同性| 成人av电影在线网| 99久久精品99国产精品| 一区二区三区在线观看欧美| 国产高清精品网站| 国产精品网曝门| 日本道色综合久久| 国产精品99久久久久久有的能看| 久久品道一品道久久精品| 一本一道久久a久久精品| 亚洲免费观看高清完整版在线观看| 97久久精品人人做人人爽50路| 亚洲欧洲精品一区二区三区不卡| 国产伦精品一区二区三区免费迷 | 国产乱码精品一区二区三区忘忧草 | 91国产福利在线| 亚洲欧洲韩国日本视频| 色老汉av一区二区三区| 色8久久人人97超碰香蕉987| 精品一区二区三区的国产在线播放 | 成人午夜看片网址| 久久久青草青青国产亚洲免观| 天天色综合天天| 欧美日韩一二三区| 午夜影院在线观看欧美| 欧美日韩美少妇| 午夜激情一区二区三区| 国产精品久久一卡二卡| 国产亚洲女人久久久久毛片| 精品欧美乱码久久久久久| 欧美中文字幕不卡| 成人开心网精品视频| 国产高清久久久久| 国产91精品露脸国语对白| 99视频精品在线| 成人午夜精品在线| 成人丝袜高跟foot| 91美女片黄在线观看| gogogo免费视频观看亚洲一| 91福利国产精品| 欧美视频一区二区三区四区| 91精品久久久久久蜜臀| 91日韩精品一区| 日本一区二区视频在线| 天天操天天干天天综合网| 一区二区三区自拍| 午夜精品视频在线观看| 麻豆精品国产91久久久久久| 欧洲人成人精品| 精品国产一区二区亚洲人成毛片 | 久久激五月天综合精品| 91在线云播放| 国产精品久久网站| 国产一区二区视频在线| 欧美本精品男人aⅴ天堂| 日本aⅴ亚洲精品中文乱码| 欧美在线免费观看亚洲| 色哟哟精品一区| 日韩欧美一级二级| 中文字幕一区av| 一级女性全黄久久生活片免费| 国产一区二区91| 成人av电影观看| 日韩欧美国产精品一区| 亚洲国产岛国毛片在线| 亚洲一区二区美女| 久久国产精品区| 不卡的电影网站| 最新中文字幕一区二区三区| 大胆欧美人体老妇| 777xxx欧美| 亚洲欧洲韩国日本视频| 国产精品美女久久久久久 | 亚洲午夜国产一区99re久久| 七七婷婷婷婷精品国产| 色综合av在线| 一区二区三区精品| 色哟哟国产精品| 亚洲自拍偷拍图区| 日韩午夜电影av| 成人免费福利片| 亚洲一区免费观看| 国产精品美女久久久久av爽李琼| 欧美日韩国产小视频| 美女在线视频一区| 亚洲视频狠狠干|