Java JOptionPane Warning showPrettyWarningPromptPane(Component caller, String msg)

Here you can find the source of showPrettyWarningPromptPane(Component caller, String msg)

Description

show Pretty Warning Prompt Pane

License

Open Source License

Declaration

public static int showPrettyWarningPromptPane(Component caller,
            String msg) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Component;

import javax.swing.JOptionPane;

public class Main {
    public static int showPrettyWarningPromptPane(Component caller,
            String msg) {/*from w w  w  .j a  va 2s .com*/
        Object[] options = { "OK", "Cancel" };

        int response = JOptionPane.showOptionDialog(null,
                "<html><body><p syle='width: 200px;'>" + msg
                        + "</p></body></html>", "Warning",
                JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
                null, options, options[0]);
        return response;
    }
}

Related

  1. getIconWarning()
  2. messageWarning(String s)
  3. messageWarning(String s)
  4. popupMessage(String title, String message, @SuppressWarnings("SameParameterValue") int icon)
  5. popupPrompt(String title, String message, @SuppressWarnings("SameParameterValue") String[] choices, String defaultOption)
  6. showWarning(Component owner, String msg)
  7. showWarning(Component parent, String title, String message)
  8. showWarning(final Component rootComponent, final String message, final String title)
  9. showWarning(final String message)