Swing 中各种提示框的工具类
来源:互联网 发布:如何重新设置网络账号 编辑:程序博客网 时间:2024/05/17 04:10
由于经常用到这类代码,故贴在这,给自己做个笔记吧
package com.swing.messagebox; import javax.swing.JOptionPane; public class GUIUtil23 { public static final String MESSAGE_WARNING = " 警告"; public static final String MESSAGE_INFORMATION = " 消息"; public static final String MESSAGE_ERROR = " 错误"; private GUIUtil23() { throw new Error("Don't let anyone instantiate this class."); } /*** * Warning boxes * * @param mesg */ public static void warningDialog(String mesg) { JOptionPane .showMessageDialog( null, "<html><font color=\"yellow\" style=\"font-weight:bold;" + "background-color:#666666\" >" + mesg + "</font></html>", MESSAGE_WARNING, JOptionPane.WARNING_MESSAGE); } /*** * error * * @param mesg */ public static void errorDialog(String mesg) { JOptionPane .showMessageDialog( null, "<html><font color=\"red\" style=\"font-weight:bold;" + "background-color:white\" >" + mesg + "</font></html>", MESSAGE_ERROR, JOptionPane.ERROR_MESSAGE); } /*** * information * * @param mesg */ public static void infoDialog(String mesg) { JOptionPane.showMessageDialog(null, "<html><font color=\"green\" style=\"font-weight:bold;\" >" + mesg + "</font></html>", MESSAGE_INFORMATION, JOptionPane.INFORMATION_MESSAGE); } }
0 0
- Swing 中各种提示框的工具类
- Swing 各种提示框
- Swing各种提示框
- Swing 各种提示框
- Swing提示框的制作
- java (Swing)的各种消息框
- Swing提示框
- Swing 提示框
- Swing提示框
- java swing 提示框
- Java Swing中的透明窗体(Windows中消息提示框的制作)
- java swing 中操作对象jtable 的方法 自定义对象jtable工具类
- 将基于 Swing 的开发工具插入 Eclipse 中
- 将基于 Swing 的开发工具插入 Eclipse 中
- 将基于 Swing 的开发工具插入 Eclipse 中
- 将基于 Swing 的开发工具插入 Eclipse 中
- swing中弹出提示框
- Java Swing 过滤提示框
- Java实现文件的RSA和DES加密算法
- webstrom 安装教程 配置js调试
- 编程之美:第一章 1.17俄罗斯方块游戏
- 剖析Spring自动注入中的注解
- c# ConcurrentQueue
- Swing 中各种提示框的工具类
- Java 类中各成分加载顺序 和 内存中的存放位置
- 通过位置找到ListView中的某个item的View
- 编程修养(五)
- 【转】通过编程自动化增加CSDN博客的访问量
- 异常
- 【NOIP2006】金明的预算方案
- [odroid-pc] ubuntu12.04 android4.0移植到odroid-pc过程
- iOS UI03_登陆+注册 UI1~3系统归纳