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

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

?? optiondialogframe.java

?? Java靈感編程1-101之21-40
?? JAVA
字號:
package optiondialog;import java.awt.*;import java.awt.event.*;import javax.swing.*;/** * <p>Title: Option Dialog Demo</p> * <p>Description: This is a Option Dialog demo</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: d6-125</p> * @author Liujun * @version 1.0 */public class OptionDialogFrame extends JFrame {  JPanel contentPane;  GridBagLayout gridBagLayout1 = new GridBagLayout();  JRadioButton jRadioButton9 = new JRadioButton();  JPanel contentPane1 = new JPanel();  JRadioButton jRadioButton8 = new JRadioButton();  JRadioButton jRadioButton7 = new JRadioButton();  JRadioButton jRadioButton6 = new JRadioButton();  JRadioButton jRadioButton10 = new JRadioButton();  JRadioButton jRadioButton5 = new JRadioButton();  GridBagLayout gridBagLayout2 = new GridBagLayout();  JRadioButton jRadioButton4 = new JRadioButton();  JRadioButton jRadioButton3 = new JRadioButton();  JRadioButton jRadioButton2 = new JRadioButton();  JRadioButton jRadioButton1 = new JRadioButton();  JLabel jLabel2 = new JLabel();  JLabel jLabel1 = new JLabel();  JButton jButton1 = new JButton();  ButtonGroup buttonGroup1 = new ButtonGroup();  ButtonGroup buttonGroup2 = new ButtonGroup();  ButtonGroup buttonGroup3 = new ButtonGroup();  JRadioButton jRadioButton11 = new JRadioButton();  JRadioButton jRadioButton12 = new JRadioButton();  JRadioButton jRadioButton13 = new JRadioButton();  JRadioButton jRadioButton14 = new JRadioButton();  JLabel jLabel3 = new JLabel();     //定義的私有變量   String Title=null;//對話框標題   private String messageString = "Message";//字符串消息對象   private Icon messageIcon //圖標消息對象      = new ImageIcon("001.gif");   private Font messageFont//Font消息對象      = new Font("Serif", Font.PLAIN, 8);   private Component messageComponent//組件消息對象      = new JPanel()         {  public void paintComponent(Graphics g)            {  super.paintComponent(g);               g.setFont(messageFont);               g.drawString("Component", 0, 8);            }            public Dimension getMinimumSize()            {  return new Dimension(12, 30);            }         };  ButtonGroup buttonGroup4 = new ButtonGroup();  JLabel jLabel4 = new JLabel();  JRadioButton jRadioButton15 = new JRadioButton();  JRadioButton jRadioButton16 = new JRadioButton();  JRadioButton jRadioButton17 = new JRadioButton();  JLabel jLabel5 = new JLabel();  //Construct the frame  public OptionDialogFrame() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    //setIconImage(Toolkit.getDefaultToolkit().createImage(OptionDialogFrame.class.getResource("[Your Icon]")));    contentPane = (JPanel) this.getContentPane();    contentPane.setLayout(gridBagLayout1);    this.setSize(new Dimension(400, 300));    this.setTitle("Frame Demo");    contentPane = (JPanel) this.getContentPane();    contentPane1.setLayout(gridBagLayout2);    contentPane1.setBorder(BorderFactory.createRaisedBevelBorder());    jRadioButton9.setText("Other");    contentPane.setLayout(gridBagLayout1);    this.setSize(new Dimension(545, 276));    this.setTitle("Return Message Frame Demo");    jRadioButton8.setText("Component");    jRadioButton7.setText("Icon");    jRadioButton6.setText("String");    jRadioButton10.setText("Object[]");    jRadioButton5.setText("PLAIN_MESSAGE");    jRadioButton4.setText("QUESTION_MESSAGE");    jRadioButton3.setText("WARNING_MESSAGE");    jRadioButton2.setText("INFORMATION_MESSAGE");    jRadioButton1.setText("ERROR_MESSAGE");    jLabel2.setText("消息");    jLabel1.setText("各種消息類型");    jButton1.setText("顯示消息框");    jButton1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton1_actionPerformed(e);      }    });    jRadioButton11.setText("缺省選項");    jRadioButton12.setText("Yes和No選項");    jRadioButton13.setText("Yes,No和Cancel選項");    jRadioButton14.setText("OK和Cancel選項");    jLabel4.setText("按鈕類型");    jRadioButton15.setText("字符方式");    jRadioButton16.setText("圖標方式");    jRadioButton17.setText("組合對象方式");    jLabel5.setText("選項方式");    contentPane1.add(jButton1,    new GridBagConstraints(0, 0, 3, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 182, -6));    contentPane1.add(jRadioButton1,   new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton2,   new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton3,   new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton5,   new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton6,   new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton7,   new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton9,   new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jLabel2,   new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jLabel1,   new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton10,   new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton8,     new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton4,     new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0            ,GridBagConstraints.SOUTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton11,   new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton12,   new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton13,   new GridBagConstraints(2, 4, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton14,   new GridBagConstraints(2, 5, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jLabel3,  new GridBagConstraints(2, 6, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jLabel4,  new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton15,  new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton16,  new GridBagConstraints(3, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jRadioButton17,  new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane1.add(jLabel5, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(contentPane1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    buttonGroup2.add(jRadioButton8);    buttonGroup2.add(jRadioButton7);    buttonGroup2.add(jRadioButton6);    buttonGroup2.add(jRadioButton9);    buttonGroup2.add(jRadioButton10);    buttonGroup1.add(jRadioButton1);    buttonGroup1.add(jRadioButton2);    buttonGroup1.add(jRadioButton3);    buttonGroup1.add(jRadioButton4);    buttonGroup1.add(jRadioButton5);    buttonGroup3.add(jRadioButton11);    buttonGroup3.add(jRadioButton12);    buttonGroup3.add(jRadioButton13);    buttonGroup3.add(jRadioButton14);    buttonGroup4.add(jRadioButton15);    buttonGroup4.add(jRadioButton16);    buttonGroup4.add(jRadioButton17);  }  //Overridden so we can exit when window is closed  protected void processWindowEvent(WindowEvent e) {    super.processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      System.exit(0);    }  }  public Object getMessage()   {  //用于得到消息對象      if (jRadioButton6.isSelected())         return messageString;//返回字符串消息對象      else if (jRadioButton7.isSelected())         return messageIcon;//返回圖標消息對象      else if (jRadioButton8.isSelected())         return messageComponent;//返回組件消息對象      else if (jRadioButton10.isSelected())         return new Object[]//返回新建立一個混合對象         {  messageString,            messageIcon,            messageComponent,            messageFont         };      else if (jRadioButton9.isSelected())         return messageFont;//返回Font消息對象      else return null;   }   public int getType()   {    String s=null;    if (jRadioButton1.isSelected()){         s ="ERROR_MESSAGE";//設置消息類型         Title="---有錯誤";//設置標題         }      else if (jRadioButton2.isSelected()){          s ="INFORMATION_MESSAGE";//設置消息類型         Title="---是提醒消息";//設置標題         }      else if (jRadioButton3.isSelected()){          s ="WARNING_MESSAGE";//設置消息類型         Title="---警告消息";//設置標題         }      else if (jRadioButton4.isSelected()){          s ="QUESTION_MESSAGE";//設置消息類型         Title="---是一個問題";//設置標題         }      else if(jRadioButton5.isSelected()){          s ="PLAIN_MESSAGE";//設置消息類型         Title="---一般的消息";//設置標題        }      try      {  Class cl = JOptionPane.class;//得到對話框類型         return cl.getField(s).getInt(cl);//根據消息類型返回類型代碼      }      catch(Exception e)      {  return -1;      }   }   public int getConfirmType()   {    String s=null;    if (jRadioButton11.isSelected()){         s ="DEFAULT_OPTION";//設置消息按鈕類型         }      else if (jRadioButton12.isSelected()){          s ="YES_NO_OPTION";//設置消息按鈕類型         }      else if (jRadioButton13.isSelected()){          s ="YES_NO_CANCEL_OPTION";//設置消息按鈕類型         }      else if (jRadioButton14.isSelected()){          s ="OK_CANCEL_OPTION";//設置消息按鈕類型         }      try      {  Class cl = JOptionPane.class;//得到對話框類型         return cl.getField(s).getInt(cl);//根據消息按鈕類型返回按鈕類型代碼      }      catch(Exception e)      {  return -1;      }   }  public Object[] getOptions()   {//得到選項類型對象     String s=null;    if (jRadioButton15.isSelected()){          //返回字符串數組         return new String[] { "Yellow", "Blue", "Red" };         }      else if (jRadioButton16.isSelected()){         return new Icon[]//返回圖標數組         {  new ImageIcon("001.gif"),            new ImageIcon("002.gif"),            new ImageIcon("003.gif")         };         }      else if (jRadioButton17.isSelected()){          return new Object[]//返回一個組合對象數組         {  messageString,            messageIcon,            messageComponent,            messageFont         };         }      else         return null;//否則返回空對象    }  void jButton1_actionPerformed(ActionEvent e) {     int Type=getType();//返回消息類型碼,顯示消息對話框     int kk=JOptionPane.showOptionDialog(this,            getMessage(),            "消息框演示"+Title,            getConfirmType(),            Type,           null,            getOptions(),            getOptions()[0] );     jLabel3.setText(String.valueOf(kk));//顯示返回值  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久蜜臀国产一区二区| 7777精品伊人久久久大香线蕉超级流畅 | 久久精品视频在线看| 亚洲九九爱视频| 狠狠色丁香婷综合久久| 91亚洲国产成人精品一区二区三| 欧美一区二区性放荡片| 亚洲欧美日韩国产综合在线| 激情久久五月天| 欧美日韩精品三区| 国产日韩精品一区二区三区| 日本欧美大码aⅴ在线播放| 日本乱码高清不卡字幕| 久久久亚洲国产美女国产盗摄| 亚洲高清免费在线| 成人精品一区二区三区中文字幕| 日韩欧美国产电影| 日韩精品亚洲专区| 日本韩国欧美一区二区三区| 中文字幕不卡在线观看| 久久不见久久见免费视频1| 欧美日韩一区二区三区四区| 中文字幕在线不卡国产视频| 国产精品一区二区你懂的| 日韩一级免费一区| 性做久久久久久免费观看欧美| 91丨九色丨国产丨porny| 国产精品色噜噜| 国产一区二区三区精品视频| 欧美一级片在线看| 日韩在线一区二区| 欧美日韩另类一区| 亚洲国产婷婷综合在线精品| 91麻豆国产在线观看| 国产精品毛片久久久久久| 国产成人啪午夜精品网站男同| 精品乱码亚洲一区二区不卡| 全国精品久久少妇| 91精品国产品国语在线不卡| 亚洲www啪成人一区二区麻豆| 91麻豆国产福利精品| 国产精品久久久久久久浪潮网站| 高潮精品一区videoshd| 欧美经典一区二区| 粉嫩久久99精品久久久久久夜| 国产亚洲精品免费| 国产ts人妖一区二区| 国产欧美一区视频| 高清在线观看日韩| 综合网在线视频| 91香蕉视频在线| 亚洲男人的天堂在线观看| 91麻豆国产福利在线观看| 一区二区三区精品视频| 欧美丝袜丝nylons| 日韩电影免费在线看| 日韩欧美在线网站| 激情综合五月天| 久久久久国产精品麻豆| 懂色av中文字幕一区二区三区| 国产欧美一区二区三区鸳鸯浴| 成人中文字幕电影| 日韩伦理电影网| 欧美日韩一区久久| 秋霞av亚洲一区二区三| 欧美va在线播放| 国产精品一区二区在线看| 国产情人综合久久777777| av在线这里只有精品| 亚洲一线二线三线久久久| 91精品在线免费| 国产一区欧美一区| 中文字幕在线一区免费| 在线免费不卡视频| 美女视频黄频大全不卡视频在线播放| 精品国产一区二区三区久久久蜜月 | 日韩一区二区三区在线| 国内久久婷婷综合| 国产精品久久夜| 在线观看免费一区| 美女网站色91| 国产精品久久久久影院亚瑟| 91国产丝袜在线播放| 日韩av高清在线观看| 久久理论电影网| 色综合久久综合网| 日韩激情一二三区| 亚洲国产激情av| 欧美在线免费视屏| 国产一区在线看| 亚洲欧美精品午睡沙发| 欧美一区二区三区在| 国产精品夜夜爽| 亚洲午夜在线视频| 久久久精品免费网站| 91激情在线视频| 久久国产三级精品| **性色生活片久久毛片| 在线播放国产精品二区一二区四区| 国产在线播精品第三| 亚洲色图在线播放| 欧美一级艳片视频免费观看| 97se亚洲国产综合自在线不卡 | 久久久亚洲欧洲日产国码αv| 色综合久久88色综合天天6 | 亚洲丝袜另类动漫二区| 日韩一区二区电影在线| 99久久99久久精品免费看蜜桃| 蜜臀av一级做a爰片久久| 中文字幕制服丝袜一区二区三区| 91精品国产综合久久精品性色 | 婷婷开心激情综合| 中文在线资源观看网站视频免费不卡 | 亚洲九九爱视频| 久久久久国产精品人| 欧美日韩精品欧美日韩精品一综合| 丰满少妇久久久久久久| 日韩电影免费一区| 亚洲视频免费在线| 国产欧美日韩中文久久| 欧美一级在线免费| 色av一区二区| 成人亚洲一区二区一| 麻豆视频观看网址久久| 一区二区欧美国产| 中文字幕精品一区二区三区精品| 91麻豆精品国产自产在线| 色中色一区二区| 成人黄色777网| 精品一区二区三区的国产在线播放| 亚洲午夜一二三区视频| 亚洲欧美在线另类| 亚洲国产成人自拍| xnxx国产精品| 日韩一区二区三区免费看| 欧美色网一区二区| 91香蕉视频黄| 成人av中文字幕| 国产九色sp调教91| 精品一区二区在线播放| 日精品一区二区| 午夜电影网一区| 一区二区高清在线| 亚洲欧美日韩国产综合在线 | 欧美性受极品xxxx喷水| 99精品热视频| 成人av网址在线| 丁香婷婷综合五月| 国产精品系列在线观看| 国内精品免费**视频| 美女在线视频一区| 美女视频黄a大片欧美| 视频一区二区三区中文字幕| 亚洲午夜在线视频| 亚洲va欧美va天堂v国产综合| 亚洲精选视频在线| 亚洲乱码日产精品bd | 日韩欧美一卡二卡| 欧美一区二区黄色| 91精品欧美福利在线观看| 91精品午夜视频| 91精品国产91久久综合桃花 | 99国产欧美另类久久久精品| 国产白丝精品91爽爽久久| 国产成人免费网站| 粉嫩嫩av羞羞动漫久久久| 粉嫩在线一区二区三区视频| 成人va在线观看| gogo大胆日本视频一区| 99麻豆久久久国产精品免费| 91在线播放网址| 一本一道综合狠狠老| 在线观看欧美日本| 7777精品伊人久久久大香线蕉的| 91麻豆精品国产91久久久更新时间 | 舔着乳尖日韩一区| 蜜臀久久99精品久久久久宅男| 麻豆国产精品官网| 国产精品中文字幕欧美| 国产传媒久久文化传媒| 99久久综合精品| 欧美中文字幕一区二区三区亚洲 | 国产一区二区中文字幕| 国产成人午夜视频| 91色在线porny| 欧美在线免费视屏| 欧美一区二区啪啪| 欧美激情艳妇裸体舞| 亚洲欧美日韩国产一区二区三区 | 久久伊人蜜桃av一区二区| 亚洲国产精品成人综合色在线婷婷 | 欧美亚洲综合色| 日韩一区二区在线观看视频| 久久久久久久性| 综合婷婷亚洲小说| 免费成人在线观看| 成人午夜视频免费看| 欧美午夜宅男影院| 欧美精品一区二区三区四区 | 久久精品日产第一区二区三区高清版 |