Here you can find the source of popupMessage(String title, String message, @SuppressWarnings("SameParameterValue") int icon)
Parameter | Description |
---|---|
icon | The icon. You can use some of the constants in JOptionPane for this. |
@SuppressWarnings("WeakerAccess") public static void popupMessage(String title, String message, @SuppressWarnings("SameParameterValue") int icon)
//package com.java2s; //License from project: Open Source License import javax.swing.*; import java.awt.*; public class Main { /**/*from w w w . ja v a 2s .c o m*/ * Gives the user a popup message with no icon. */ public static void popupMessage(String title, String message) { popupMessage(title, message, JOptionPane.PLAIN_MESSAGE); } /** * Gives a popup to the user. * @param icon The icon. You can use some of the constants in JOptionPane for this. */ @SuppressWarnings("WeakerAccess") public static void popupMessage(String title, String message, @SuppressWarnings("SameParameterValue") int icon) { Canvas frame = new Canvas(); JOptionPane.showMessageDialog(frame, message, title, icon); } }