From 42f7d379a430aaf2fad169f0170de04072b08b10 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 22 Apr 2016 14:48:04 -0400 Subject: Formatting changes --- .../src/main/java/bjc/utils/gui/SimpleDialogs.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'BJC-Utils2/src/main/java/bjc/utils/gui') diff --git a/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java b/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java index 37f7edf..51d9d5d 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java +++ b/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java @@ -265,4 +265,28 @@ public class SimpleDialogs { JOptionPane.showMessageDialog(parent, errorMessage, title, JOptionPane.ERROR_MESSAGE); } + + /** + * Show an informative message to the user + * + * @param parent + * The parent for this dialog + * @param title + * Show the title for this dialog + * @param message + * Show the message for this dialog + */ + public static void showMessage(Component parent, String title, + String message) { + if (parent == null) { + throw new NullPointerException("Parent must not be null"); + } else if (title == null) { + throw new NullPointerException("Title must not be null"); + } else if (message == null) { + throw new NullPointerException("Message must not be null"); + } + + JOptionPane.showMessageDialog(parent, title, message, + JOptionPane.INFORMATION_MESSAGE); + } } \ No newline at end of file -- cgit v1.2.3