zoukankan      html  css  js  c++  java
  • JOptionPane常用提示框

    1 //JOptionPane.showMessageDialog(parentComponent, message, title, messageType, icon);
    2 JOptionPane.showMessageDialog(null, "message", "title",JOptionPane.INFORMATION_MESSAGE,new ImageIcon("psb.jpg"));

    1 JOptionPane.showConfirmDialog(null, "message", "title",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
    2 //JOptionPane.showConfirmDialog(parentComponent, message, title, optionType, messageType, icon);    
    3 JOptionPane.showConfirmDialog(null, "message", "title",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,new ImageIcon("psb.jpg"));

    1 String str [] = {"篮球","足球","排球"};
    2 //JOptionPane.showInputDialog(parentComponent, message, title, messageType, icon, selectionValues, initialSelectionValue)
    3 JOptionPane.showInputDialog(null, "message", "title",JOptionPane.INFORMATION_MESSAGE,new ImageIcon("psb.jpg") ,str, str[0]);

    1 String str [] = {"篮球","足球","排球"};
    2 //JOptionPane.showOptionDialog(parentComponent, message, title, optionType, messageType, icon, options, initialValue)
    3 JOptionPane.showOptionDialog(null,"message","title",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,new ImageIcon("psb.jpg"),str,str[0]);

     函数字段中存在  Internal  则该提示框  parentComponent  不能为空。

  • 相关阅读:
    C#关机代码实例详解
    如何设计通用的网站模板
    C# XML解析方式实例解析1
    ASP.NET配置错误页面浅析
    几种常用的C#排序方法简介
    简述C# XML解析方法的特点及应用
    请不要相信
    浅谈ASP.NET Forms验证
    设计友好的错误信息页面
    详解.NET中容易混淆的委托与接口
  • 原文地址:https://www.cnblogs.com/the-wang/p/7018947.html
Copyright © 2011-2022 走看看