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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dialogdemo.java

?? Java樣例程序集合:2D
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
                                    "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);                    //HACK used to get a close button.  This dialog                    //illustrates the questionable practice of not                    //letting someone close the window using the                    //window decoration.  Since the Java Look and Feel                    //doesn't decorate its dialogs with a close button,                    //we must turn on system window decorations in hopes                    //of getting a close button.                    JDialog.setDefaultLookAndFeelDecorated(false);                    //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.");                        }                    });                    //Undo the hack!                    JDialog.setDefaultLookAndFeelDecorated(true);                    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() {        //Make sure we have nice window decorations.        JFrame.setDefaultLookAndFeelDecorated(true);        //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();            }        });    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天爽夜夜爽夜夜爽精品视频| 欧美日韩一本到| 天天色天天操综合| 久久久亚洲欧洲日产国码αv| 国产日产欧美一区二区三区| 亚洲精品一区二区三区福利| 欧美日韩专区在线| 欧美亚洲禁片免费| 91麻豆精品国产91久久久久久久久| 国产一区二区视频在线| 不卡一区二区在线| 日韩欧美一级精品久久| 久久久蜜臀国产一区二区| 亚洲一区二区三区免费视频| 日韩免费看的电影| 成人午夜短视频| 日韩美女精品在线| 亚洲一级二级在线| 国产精品性做久久久久久| 国产一区二区三区蝌蚪| 欧美午夜精品理论片a级按摩| 青青国产91久久久久久| 精品国产伦理网| 亚洲一区二区视频在线| 国产精品一区二区黑丝| 欧美日韩一区二区欧美激情 | 亚洲国产精品尤物yw在线观看| 欧美福利视频一区| 色综合久久中文字幕综合网| 欧美一区二区免费视频| 亚洲精品v日韩精品| 国产剧情在线观看一区二区| 日韩午夜在线观看| 五月婷婷综合在线| 色哦色哦哦色天天综合| 自拍av一区二区三区| 成人网在线免费视频| 国产91在线看| 亚洲私人黄色宅男| 色先锋久久av资源部| 亚洲日本一区二区| 91麻豆精品国产自产在线| 蜜桃av一区二区在线观看| 精品免费国产二区三区| 国产真实精品久久二三区| 日韩一区在线免费观看| 在线精品视频一区二区| 国内精品伊人久久久久影院对白| 精品国产免费人成电影在线观看四季| 国内一区二区视频| 亚洲一区二区五区| 精品日韩一区二区三区免费视频| 久久福利资源站| 91精品国产色综合久久久蜜香臀| 美女视频网站黄色亚洲| 麻豆传媒一区二区三区| 国产精品18久久久久| 丁香网亚洲国际| 91欧美一区二区| 欧美人体做爰大胆视频| 精品国产免费视频| 亚洲色图色小说| 国产在线不卡一区| 自拍偷拍亚洲欧美日韩| 欧美激情一区不卡| 中文字幕永久在线不卡| 国产欧美日产一区| 国产精品久久久久永久免费观看 | 国产精品自在欧美一区| 日韩中文字幕区一区有砖一区| 一区二区三区在线视频免费| 国产精品进线69影院| 亚洲精品国产视频| 亚洲午夜久久久| 蜜乳av一区二区三区| 老司机一区二区| 丰满亚洲少妇av| 色婷婷综合久久久中文一区二区 | 亚洲一区二区三区四区不卡| 一片黄亚洲嫩模| 久久精品久久综合| 狠狠久久亚洲欧美| 欧美性猛交xxxxxx富婆| 欧美亚洲一区三区| 欧美成va人片在线观看| 日韩美女视频19| 加勒比av一区二区| 日本道免费精品一区二区三区| 777a∨成人精品桃花网| 国产精品色噜噜| 日韩1区2区日韩1区2区| 91丨九色丨尤物| 久久久99精品免费观看不卡| 国产精品久久综合| 国产精品白丝av| 日韩欧美亚洲一区二区| 亚洲自拍偷拍综合| 91啦中文在线观看| 国产女同性恋一区二区| 久久精品国产精品亚洲红杏| 欧美在线观看视频一区二区| 中文字幕五月欧美| 国产成人在线色| 日本一区二区三级电影在线观看| 日韩成人一级片| 91精品国产综合久久久久久久| 国产精品麻豆一区二区| 97久久精品人人爽人人爽蜜臀| 精品国产a毛片| 国产乱妇无码大片在线观看| 日韩一级成人av| 国产一区二区三区国产| 26uuu久久天堂性欧美| 美国av一区二区| 国产日产欧产精品推荐色| 国产成人aaa| 亚洲精品乱码久久久久| 欧美日韩一卡二卡三卡| 极品瑜伽女神91| 中文字幕一区二区在线观看| 99re8在线精品视频免费播放| 亚洲丝袜另类动漫二区| 91麻豆精品91久久久久同性| 日本成人在线电影网| 亚洲人成精品久久久久久| 欧美网站大全在线观看| 国产美女精品人人做人人爽| 亚洲视频 欧洲视频| 亚洲精品在线观看网站| 91麻豆免费观看| 狠狠色综合日日| 天天av天天翘天天综合网| xfplay精品久久| 欧美一卡二卡三卡| 色偷偷一区二区三区| 国产激情视频一区二区三区欧美| 一区二区三区**美女毛片| 国产精品欧美极品| 久久理论电影网| 精品国精品自拍自在线| 欧美一区二区三区视频在线观看 | 亚洲国产欧美另类丝袜| 国产精品久久久久7777按摩| 精品国一区二区三区| 欧美日韩精品一区二区三区四区| 成av人片一区二区| 国产精品一区在线观看你懂的| 五月天网站亚洲| 日本不卡免费在线视频| 美国av一区二区| 韩国成人在线视频| 成人a级免费电影| 91视频在线观看| 91麻豆精品国产91久久久久久久久| 欧美午夜一区二区三区免费大片| 欧美怡红院视频| 欧美岛国在线观看| 国产欧美精品国产国产专区| 国产清纯白嫩初高生在线观看91 | 捆绑变态av一区二区三区| 国内不卡的二区三区中文字幕| 国产成人av福利| 91福利国产精品| 国产区在线观看成人精品| 亚洲乱码国产乱码精品精98午夜| 亚洲国产一区在线观看| 国产成人精品免费一区二区| 91黄色小视频| 国产精品你懂的| 免费看日韩a级影片| www.99精品| 久久夜色精品国产欧美乱极品| 亚洲一区二区在线观看视频| 国内精品不卡在线| 欧美电影精品一区二区| 中文字幕在线播放不卡一区| 国内精品在线播放| 日韩一区二区三区视频| 天天色图综合网| 欧美色成人综合| 午夜精品在线看| 欧美色综合天天久久综合精品| 欧美激情资源网| av福利精品导航| 亚洲精品五月天| 色老头久久综合| 久久99精品视频| 亚洲精品一区二区在线观看| 久久99久久久久久久久久久| 欧美一级高清大全免费观看| 久久福利视频一区二区| 精品国产一区a| 国产成人免费av在线| **欧美大码日韩| 在线国产电影不卡| 免费不卡在线观看| 国产亚洲精品久| 欧美区一区二区三区| 日本欧美肥老太交大片| 国产精品久久午夜夜伦鲁鲁|