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

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

?? 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.",

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品嫩草久久久久| 成人激情文学综合网| 午夜婷婷国产麻豆精品| 亚洲另类春色校园小说| 亚洲美女电影在线| 亚洲综合激情另类小说区| 亚洲狠狠丁香婷婷综合久久久| 国产精品久99| 亚洲欧洲中文日韩久久av乱码| 一区在线中文字幕| 亚洲色图一区二区三区| 亚洲精品视频在线看| 亚洲一线二线三线久久久| 午夜精品免费在线观看| 日韩1区2区日韩1区2区| 久久99日本精品| 国产精品夜夜嗨| av不卡免费电影| 日本国产一区二区| 欧美午夜免费电影| 日韩欧美一区在线观看| 亚洲精品一区二区三区四区高清| 国产亚洲成av人在线观看导航| 国产欧美日本一区视频| 最近日韩中文字幕| 亚洲大片在线观看| 成人av网址在线| 在线一区二区观看| 日韩一区二区在线观看视频| 欧美成人性战久久| 国产精品欧美极品| 亚洲国产精品久久人人爱蜜臀 | 一区二区三区中文字幕| 午夜视频一区二区| 精品影视av免费| 99久久婷婷国产精品综合| 欧美日韩另类一区| ww久久中文字幕| 亚洲欧美另类小说| 美国十次综合导航| 不卡的电影网站| 欧美日韩另类一区| 国产免费成人在线视频| 亚洲自拍与偷拍| 韩国女主播成人在线观看| 91视视频在线观看入口直接观看www | 丁香网亚洲国际| 欧美在线观看你懂的| 亚洲精品在线电影| 一区二区日韩电影| 国产一区欧美一区| 欧美日韩一区二区三区在线看| 精品捆绑美女sm三区| 一区二区三区高清| 国产精品资源在线| 欧美日韩你懂得| 精品日韩一区二区| 一区二区三区在线视频观看58| 毛片av一区二区| 色丁香久综合在线久综合在线观看| 欧美一区二区三区四区视频| 久久影院视频免费| 亚洲bdsm女犯bdsm网站| 成人动漫精品一区二区| 欧美不卡一区二区| 亚洲成在人线免费| 不卡的av电影在线观看| 精品国产一区二区三区四区四 | 亚洲自拍欧美精品| 成人久久18免费网站麻豆| 日韩一区二区电影网| 亚洲影视在线播放| eeuss影院一区二区三区| 26uuu欧美| 日日摸夜夜添夜夜添精品视频 | 日韩精品一区二区三区在线| 一区二区在线观看视频| 国产激情一区二区三区| 51午夜精品国产| 亚洲激情图片小说视频| 成人av小说网| 国产亚洲综合av| 久久99国产精品免费网站| 欧美三区在线视频| 亚洲精品视频观看| av中文一区二区三区| 国产日韩欧美精品在线| 激情小说亚洲一区| 日韩欧美视频一区| 日本不卡一区二区三区高清视频| 在线影院国内精品| 樱桃国产成人精品视频| 99精品视频在线播放观看| 亚洲成人手机在线| 97久久精品人人做人人爽| 国产清纯白嫩初高生在线观看91 | 美国av一区二区| 欧美群妇大交群中文字幕| 亚洲一区二区三区自拍| 欧美专区日韩专区| 亚洲国产一区二区视频| 在线一区二区三区四区| 亚洲综合图片区| 欧美在线一区二区| 亚洲国产欧美另类丝袜| 欧美伊人久久久久久午夜久久久久| 日韩理论片网站| 色88888久久久久久影院按摩 | 国产在线视频精品一区| 欧美精品一区二区三区在线播放| 麻豆精品在线视频| 日韩久久久精品| 国产在线播放一区| 久久蜜臀中文字幕| 国产91精品精华液一区二区三区| 久久久精品一品道一区| 成人黄动漫网站免费app| 国产精品欧美综合在线| 91丨九色丨尤物| 亚洲一区二区影院| 欧美一区永久视频免费观看| 久久精品国产99国产| 久久综合丝袜日本网| 国产精品66部| 国产精品久久久久一区二区三区共 | 国产精品99久久久| 亚洲视频一区在线观看| 欧美日韩一区 二区 三区 久久精品| 午夜亚洲福利老司机| 日韩欧美中文字幕制服| 国产成人免费视| 一区二区视频在线看| 91精品国产91久久久久久一区二区 | 欧美在线观看一二区| 青青草国产成人av片免费| 久久亚洲一区二区三区四区| 成人国产视频在线观看| 一区二区三区不卡在线观看| 91精品蜜臀在线一区尤物| 国内精品免费**视频| 中文字幕在线不卡国产视频| 精品视频1区2区| 久久99精品久久久| 国产精品第一页第二页第三页| 欧美视频你懂的| 国产主播一区二区三区| 亚洲美女电影在线| 精品乱人伦小说| 色哟哟一区二区在线观看| 裸体一区二区三区| 一色桃子久久精品亚洲| 日韩一区二区三区视频在线观看| 成人午夜在线播放| 日韩av电影免费观看高清完整版 | 91小视频在线免费看| 日韩成人免费在线| 国产精品美女视频| 在线综合亚洲欧美在线视频| 国产精品 欧美精品| 婷婷开心激情综合| 日本一区二区三区四区| 欧美视频在线一区二区三区| 国产经典欧美精品| 日本欧美大码aⅴ在线播放| 国产精品私人影院| 日韩视频中午一区| 在线免费观看视频一区| 粉嫩嫩av羞羞动漫久久久 | 欧美视频在线观看一区二区| 国产成人av影院| 免费成人av资源网| 亚洲精品成人天堂一二三| 久久久久国产一区二区三区四区 | 亚洲色大成网站www久久九九| 日韩一区二区三区在线| 欧美在线一区二区| caoporm超碰国产精品| 国产原创一区二区| 日韩av中文字幕一区二区三区 | 一本久久精品一区二区| 国产成人精品一区二区三区四区| 日韩激情视频在线观看| 一区二区在线观看免费视频播放| 欧美国产日本视频| 欧美精品一区二区三区蜜桃视频| 欧美日韩国产另类一区| 91麻豆成人久久精品二区三区| 国产在线观看免费一区| 久久福利视频一区二区| 视频一区免费在线观看| 亚洲一二三四区| 一区二区三区不卡视频在线观看| 中文字幕在线播放不卡一区| 欧美激情中文字幕| 久久午夜羞羞影院免费观看| 日韩欧美卡一卡二| 日韩午夜激情免费电影| 91精品国产91久久综合桃花| 欧美日韩中字一区| 欧美日韩的一区二区|