Here you can find the source of guiError(String errormsg, String errortitle)
Parameter | Description |
---|---|
errormsg | The error message to be shown with this dialog. |
errortitle | The title of the error message to be shown in the window. |
public static void guiError(String errormsg, String errortitle)
//package com.java2s; /*/*from ww w .j a v a 2 s.co m*/ Colored Trails Copyright (C) 2006, President and Fellows of Harvard College. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import javax.swing.*; public class Main { /** * Create a gui dialog representing an error which occurred. * * @param errormsg The error message to be shown with this dialog. */ public static void guiError(String errormsg) { guiError(errormsg, "Error"); } /** * Create a gui dialog representing an error which occurred. * * @param errormsg The error message to be shown with this dialog. * @param errortitle The title of the error message to be shown in the * window. */ public static void guiError(String errormsg, String errortitle) { JOptionPane.showMessageDialog(null, errormsg, errortitle, JOptionPane.ERROR_MESSAGE); } }