import javax.swing.*; /** * Class to make it easy to do output to the user * using JOptionPane * @author Barbara Ericson * @copyright Georgia Tech */ public class SimpleOutput { /** * Method to show a warning to a user * @param message the message to display */ public static void showWarning(String message) { JOptionPane.showMessageDialog(null,message,"Warning Display", JOptionPane.WARNING_MESSAGE); } /** * Method to show an error to a user * @param message the message to display */ public static void showError(String message) { JOptionPane.showMessageDialog(null,message,"Error Display", JOptionPane.ERROR_MESSAGE); } /** * Method to show information to the user * @param message the message to display */ public static void showInformation(String message) { JOptionPane.showMessageDialog(null, message, "Information Display", JOptionPane.INFORMATION_MESSAGE); } } // end of SimpleOutput class