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

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

?? messagedialogframe.java

?? Java靈感編程1-101之21-40
?? JAVA
字號:
package messagedialog;import java.awt.*;import java.awt.event.*;import javax.swing.*;/** * <p>Title: Message Dialog Demo</p> * <p>Description: This is a MessageDialog demo</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: d6-125</p> * @author Liujun * @version 1.0 */public class MessageDialogFrame extends JFrame {  JPanel contentPane;  JButton jButton1 = new JButton();  GridBagLayout gridBagLayout1 = new GridBagLayout();  ButtonGroup buttonGroup1 = new ButtonGroup();  ButtonGroup buttonGroup2 = new ButtonGroup();  JRadioButton jRadioButton1 = new JRadioButton();  JRadioButton jRadioButton2 = new JRadioButton();  JRadioButton jRadioButton3 = new JRadioButton();  JRadioButton jRadioButton4 = new JRadioButton();  JRadioButton jRadioButton5 = new JRadioButton();  JRadioButton jRadioButton6 = new JRadioButton();  JRadioButton jRadioButton7 = new JRadioButton();  JRadioButton jRadioButton8 = new JRadioButton();  JRadioButton jRadioButton9 = new JRadioButton();  JLabel jLabel1 = new JLabel();  JLabel jLabel2 = new JLabel();  JRadioButton jRadioButton10 = new JRadioButton();   //定義的私有變量   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);            }         }; //Construct the frame  public MessageDialogFrame() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    //setIconImage(Toolkit.getDefaultToolkit().createImage(MessageDialogFrame.class.getResource("[Your Icon]")));    contentPane = (JPanel) this.getContentPane();    contentPane.setLayout(gridBagLayout1);    this.setSize(new Dimension(336, 249));    this.setTitle("Message Dialog Frame Demo");    jButton1.setText("顯示消息框");    jButton1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton1_actionPerformed(e);      }    });    contentPane.setBorder(BorderFactory.createRaisedBevelBorder());    jRadioButton1.setText("ERROR_MESSAGE");    jRadioButton2.setText("INFORMATION_MESSAGE");    jRadioButton3.setText("WARNING_MESSAGE");    jRadioButton4.setText("QUESTION_MESSAGE");    jRadioButton5.setText("PLAIN_MESSAGE");    jRadioButton6.setText("String");    jRadioButton7.setText("Icon");    jRadioButton8.setText("Component");    jRadioButton9.setText("Other");    jLabel1.setText("各種消息類型");    jLabel2.setText("消息");    jRadioButton10.setText("Object[]");    contentPane.add(jButton1,                  new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 80, -6));    contentPane.add(jRadioButton1,       new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton2,       new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton3,       new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton4,       new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton5,       new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton6,     new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton7,     new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton9,     new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    buttonGroup1.add(jRadioButton1);    buttonGroup1.add(jRadioButton2);    buttonGroup1.add(jRadioButton3);    buttonGroup1.add(jRadioButton4);    buttonGroup1.add(jRadioButton5);    buttonGroup2.add(jRadioButton6);    buttonGroup2.add(jRadioButton7);    buttonGroup2.add(jRadioButton8);    buttonGroup2.add(jRadioButton9);    buttonGroup2.add(jRadioButton10);    contentPane.add(jLabel2,  new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jLabel1,  new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton10,   new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));    contentPane.add(jRadioButton8,  new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0            ,GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(-5, 0, 5, 0), 0, 0));  }  //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;      }   }  void jButton1_actionPerformed(ActionEvent e) {     int Type=getType();//返回消息類型碼,顯示消息對話框         JOptionPane.showMessageDialog(this,            getMessage(),            "消息框演示"+Title,            Type);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩亚洲综合在线 欧美亚洲特黄一级| 欧美影院一区二区三区| 色婷婷综合视频在线观看| 91精品在线观看入口| 中文字幕一区av| 紧缚奴在线一区二区三区| 色天使色偷偷av一区二区| 精品国产伦一区二区三区观看方式 | 视频一区在线播放| www..com久久爱| 久久综合资源网| 午夜精品久久久久久久| 99精品久久只有精品| 久久在线观看免费| 轻轻草成人在线| 欧美日韩免费电影| 亚洲精品高清视频在线观看| caoporn国产一区二区| 国产午夜亚洲精品羞羞网站| 日本中文一区二区三区| 欧美日韩亚洲国产综合| 亚洲日本乱码在线观看| 日本午夜一区二区| 色乱码一区二区三区88| 国产成人自拍在线| 毛片不卡一区二区| 色成年激情久久综合| 亚洲精品在线三区| 奇米色一区二区| 欧美日韩国产不卡| 午夜精品一区二区三区三上悠亚| 日本福利一区二区| 一卡二卡欧美日韩| 色网站国产精品| 一个色综合网站| 色悠悠久久综合| 一区二区三区在线视频播放| 色伊人久久综合中文字幕| 亚洲欧美国产三级| 在线观看区一区二| 日韩极品在线观看| 精品免费日韩av| 国产成人综合自拍| 国产精品不卡在线| 91久久奴性调教| 日韩av电影一区| 欧美成人精品福利| 成人免费观看av| 亚洲日本免费电影| 欧美日韩国产精品自在自线| 欧美aaaaaa午夜精品| 久久午夜国产精品| 99re亚洲国产精品| 亚洲国产日韩综合久久精品| 在线综合亚洲欧美在线视频| 国产一区视频在线看| 日本一区二区三区久久久久久久久不 | 欧美不卡激情三级在线观看| 高清不卡一区二区在线| 亚洲精品写真福利| 7777精品伊人久久久大香线蕉的| 久久91精品久久久久久秒播| 国产精品视频第一区| 欧美性受xxxx| 激情综合亚洲精品| 亚洲自拍欧美精品| 久久免费国产精品| 91网站最新网址| 看片的网站亚洲| 国产精品成人午夜| 欧美大黄免费观看| 在线观看亚洲a| 国产成人aaaa| 蜜桃91丨九色丨蝌蚪91桃色| 中文字幕一区视频| 欧美大度的电影原声| 欧美在线一区二区| 国产91精品久久久久久久网曝门 | 91美女片黄在线观看| 久久99精品久久久久久| 亚洲综合偷拍欧美一区色| 久久久99精品免费观看不卡| 欧美优质美女网站| 成人国产精品免费| 国产精品一区二区无线| 日韩激情视频在线观看| 亚洲欧美日韩国产综合在线| 精品成人佐山爱一区二区| 欧美性欧美巨大黑白大战| 国产91清纯白嫩初高中在线观看| 另类成人小视频在线| 亚洲电影欧美电影有声小说| 国产精品区一区二区三区| 精品国产乱子伦一区| 欧美一区二区三区不卡| 欧亚一区二区三区| 一本色道久久综合狠狠躁的推荐| 国产精品66部| 久久精品国产99国产| 午夜电影网一区| 亚洲国产综合91精品麻豆| 亚洲日穴在线视频| 综合网在线视频| 国产精品久久三| 中文字幕精品—区二区四季| 久久久久久免费毛片精品| 日韩欧美在线影院| 日韩一卡二卡三卡国产欧美| 欧美浪妇xxxx高跟鞋交| 欧美日韩视频在线观看一区二区三区 | 欧美日韩在线播放三区四区| 91麻豆免费看| 一本到不卡免费一区二区| 懂色av一区二区三区免费看| 国产999精品久久久久久| 国产乱人伦偷精品视频免下载 | 久久99精品久久久久| 久久久久国产成人精品亚洲午夜| 91年精品国产| 91极品美女在线| 国产精品沙发午睡系列990531| 欧美日韩激情一区| 日韩色在线观看| 67194成人在线观看| 亚洲女子a中天字幕| 丁香天五香天堂综合| 欧美不卡一区二区三区| 亚洲va天堂va国产va久| 欧美色精品天天在线观看视频| 成人免费在线视频观看| 丁香啪啪综合成人亚洲小说| 久久久影视传媒| 成人av在线看| 丁香婷婷综合激情五月色| 国产女人18毛片水真多成人如厕| 不卡一区中文字幕| 在线视频一区二区三区| 亚洲女人的天堂| 欧美丝袜自拍制服另类| 亚洲一级二级三级| 欧美艳星brazzers| 五月婷婷久久丁香| 精品久久人人做人人爽| 国产盗摄女厕一区二区三区| 中文欧美字幕免费| 色天天综合色天天久久| 一区二区三区日韩精品| 欧美精品在线视频| 激情欧美一区二区| 亚洲精品国产a久久久久久| 欧美精选在线播放| 另类综合日韩欧美亚洲| 国产精品视频一二| 欧美人狂配大交3d怪物一区| 麻豆成人综合网| 亚洲欧美一区二区三区久本道91 | 99re热视频精品| 亚洲国产精品一区二区久久恐怖片 | 精品视频一区二区不卡| 美女一区二区三区| 亚洲免费av网站| 国产视频一区在线观看| 欧美日韩一区二区欧美激情| 东方欧美亚洲色图在线| 五月综合激情婷婷六月色窝| 国产精品理论片在线观看| 欧美大尺度电影在线| 色偷偷久久人人79超碰人人澡| 国产精品理论片在线观看| 亚洲欧美在线aaa| 国产福利一区二区三区视频在线| 日韩一区二区电影| 亚洲午夜av在线| 欧洲另类一二三四区| 国产真实乱子伦精品视频| 精品久久久久久久久久久久久久久久久| 国产乱码精品一区二区三| 色视频一区二区| 国产精品久久久久久久久免费相片| 免费一级欧美片在线观看| 91久久精品一区二区二区| 国产精品色在线观看| 老司机精品视频导航| 777午夜精品免费视频| 亚洲精品视频一区| 99综合影院在线| 日本一区二区三区电影| 国内精品不卡在线| 欧美成人高清电影在线| 日韩成人免费在线| 欧美日韩国产高清一区| 亚洲精品久久久久久国产精华液| 成人激情免费电影网址| 中文字幕高清一区| 风间由美一区二区av101| 国产精品丝袜黑色高跟| 国产91丝袜在线播放| 中文子幕无线码一区tr| 顶级嫩模精品视频在线看| 国产精品天干天干在线综合|