?? messagebox.java
字號:
/*********************************************************************/
/*(c) Copyright IBM Corp. 2004 All rights reserved. */
/* */
/*This sample program is owned by International Business Machines */
/*Corporation or one of its subsidiaries ("IBM") and is copyrighted */
/*and licensed, not sold. */
/* */
/*You may copy, modify, and distribute this sample program in any */
/*form without payment to IBM, for any purpose including developing,*/
/*using, marketing or distributing programs that include or are */
/*derivative works of the sample program. */
/* */
/*The sample program is provided to you on an "AS IS" basis, without */
/*warranty of any kind. IBM HEREBY EXPRESSLY DISCLAIMS ALL */
/*WARRANTIES EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO*/
/*THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC-*/
/*ULAR PURPOSE. Some jurisdictions do not allow for the exclusion or */
/*limitation of implied warranties, so the above limitations or */
/*exclusions may not apply to you. IBM shall not be liable for any */
/*damages you suffer as a result of using, modifying or distributing */
/*the sample program or its derivatives. */
/* */
/*Each copy of any portion of this sample program or any derivative */
/*work, must include a the above copyright notice and disclaimer of */
/*warranty. */
/* */
/*********************************************************************/
package com.ibm.ExcelDB2;
/*********************************************************************/
/* Throws up a dialog box with a error message */
/*********************************************************************/
import javax.swing.*;
public class MessageBox {
/**
* Method showErrorMessageDialog.
* @param e
* @param title
*/
public static void showErrorMessageDialog(Exception e, String title) {
JOptionPane.showMessageDialog(null, e.getMessage(), title, JOptionPane.ERROR_MESSAGE);
}
/**
* Method showMessageDialog.
* @param message
* @param title
*/
public static void showMessageDialog(String message, String title) {
JOptionPane.showMessageDialog(null, message, title, JOptionPane.PLAIN_MESSAGE);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -