diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-22 14:48:04 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-22 14:48:04 -0400 |
| commit | 42f7d379a430aaf2fad169f0170de04072b08b10 (patch) | |
| tree | 5d46b43b2d9272f4e593820ee147b3ae3f0d82b0 /BJC-Utils2/src/main/java/bjc/utils/gui | |
| parent | b65b705c391bb772bc41269bce5243c1cc88969d (diff) | |
Formatting changes
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/gui')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java | 24 |
1 files changed, 24 insertions, 0 deletions
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 |
