Example usage for javax.swing JOptionPane showMessageDialog

List of usage examples for javax.swing JOptionPane showMessageDialog

Introduction

In this page you can find the example usage for javax.swing JOptionPane showMessageDialog.

Prototype

public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType)
        throws HeadlessException 

Source Link

Document

Brings up a dialog that displays a message using a default icon determined by the messageType parameter.

Usage

From source file:Main.java

public static void alert(String message) {
    JOptionPane.showMessageDialog(null, message, "Alert", JOptionPane.WARNING_MESSAGE);
}

From source file:Main.java

public static void alertWarning(String message) {
    JOptionPane.showMessageDialog(null, message, "Warning", JOptionPane.WARNING_MESSAGE);
}

From source file:Main.java

public static void warning(String warningMessage) {
    JOptionPane.showMessageDialog(new JFrame(), warningMessage, "WARNING", JOptionPane.WARNING_MESSAGE);
}

From source file:Main.java

public static void showWarning(Component parent, String warnMessage) {
    JOptionPane.showMessageDialog(parent, warnMessage, "Warning", JOptionPane.WARNING_MESSAGE);
}

From source file:Main.java

public static void showMessage(Window owner, String msg, String title) {
    JOptionPane.showMessageDialog(owner, msg, title, JOptionPane.INFORMATION_MESSAGE);
}

From source file:Main.java

public static void showWarning(Window owner, String msg, String title) {
    JOptionPane.showMessageDialog(owner, msg, title, JOptionPane.WARNING_MESSAGE);
}

From source file:Main.java

public static void showErrorMessage(Component parent, Object errMsg) {
    JOptionPane.showMessageDialog(parent, errMsg, "Error", JOptionPane.ERROR_MESSAGE);
}

From source file:Main.java

public static final void alert(Component component, String title, String msg) {
    JOptionPane.showMessageDialog(component, msg, title, JOptionPane.ERROR_MESSAGE);
}

From source file:Main.java

public static void showErrorMessage(Component parentComponent, String mensagem) {
    JOptionPane.showMessageDialog(parentComponent, mensagem, "Erro", JOptionPane.ERROR_MESSAGE);
}

From source file:Main.java

public static void showErrorDialog(Component parentComponent, String message) {
    JOptionPane.showMessageDialog(parentComponent, message, "Error", JOptionPane.ERROR_MESSAGE);
}