Here you can find the source of showPrettyWarningPromptPane(Component caller, String msg)
public static int showPrettyWarningPromptPane(Component caller, String msg)
//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; } }