Java JOptionPane Error showErrorMessage(Component parent, String message)

Here you can find the source of showErrorMessage(Component parent, String message)

Description

Method used to show an error dialog on the screen

License

Open Source License

Parameter

Parameter Description
parent the parent component of the dialog (if any)
message the message to show inside the dialog

Declaration

@Deprecated
public static void showErrorMessage(Component parent, String message) 

Method Source Code


//package com.java2s;
/*/*ww w.j  a v  a2 s .com*/
Copyright 2012 Juan Mart?n Runge
    
jmrunge@gmail.com
http://www.zirsi.com.ar
    
This file is part of ZirUtils.
    
ZirUtils 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 3 of the License, or
(at your option) any later version.
    
ZirUtils 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 ZirUtils.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.awt.Component;
import javax.swing.JOptionPane;

public class Main {
    /**
     * Method used to show an error dialog on the screen
     * 
     * @param parent the parent component of the dialog (if any)
     * @param message the message to show inside the dialog
     * @deprecated
     */
    @Deprecated
    public static void showErrorMessage(Component parent, String message) {
        JOptionPane.showMessageDialog(parent, message, "Error", JOptionPane.ERROR_MESSAGE);
    }
}

Related

  1. showErrorBox(Component aParent, String aTitle, String aMessage)
  2. showErrorBox(Component pParent, String pMessage, String pTitle)
  3. showErrorConfirmBox(Component pParent, String pMessage, String pTitle, String pLeftOption, String pRightOption)
  4. showErrorDialog(JFrame parent, Exception ex)
  5. showErrorMessage(Component c, Exception e)
  6. showErrorMessage(Component parent, String str)
  7. showErrorMessage(Component parent, String str)
  8. showErrorMessage(Component parent, Throwable error)
  9. showErrorMessage(Component parentComponent, String message, String title)