/* * RedmondMsgOut.java * * Created on January 6, 2005, 9:45 AM * Copied from version Created on September 16, 2002, 12:43 PM */ package IO; import javax.swing.*; /** * * @author Mike */ public class RedmondMsgOut { /** Creates a new instance of RedmondMsgOut */ public RedmondMsgOut() { } /** * Use msg boxes to display output, while also displaying the same * info to Output Window so can check results * * Given: * message to display to the user * Returns: * nothing */ public static void display(String msg) { JOptionPane.showMessageDialog(null, msg); System.out.println(msg); } /** * @param args the command line arguments * for testing class */ public static void main(String[] args) { int age = RedmondMsgInBasic.readValid("What is your age",10,120); display("You are " + age + " years old"); System.exit(0); } }