* Purpose: To easily get input from a jOptionPane call
*/
import javax.swing.*;
public class PopUpReader {
//method that returns the integer representation of input from a jOptionPain call
public static int readInt(String message){
return(Integer.parseInt(readString(message)));
}
//method that returns the double representation of input from a jOptionPain call
public static double readDouble(String message){
return(Double.parseDouble(readString(message)));
}
//method that returns the char representation of input from a jOptionPain call
public static char readChar(String message){
return(readString(message).charAt(0));
}
//helper method that returns the String input from a jOptionPain call
public static String readString(String message){
return(JOptionPane.showInputDialog(null, message));
}
}
Published by Chris Chen
Chris is currently attending the University of California, Berkeley seeking an undergraduate's degree in Electrical Engineering Computer Science. He enjoys playing basketball, practicing kendo, hanging out w... View profile
- An Overview of Looping in 80x86 ArchitectureThis article will show you basic examples of programming loops and logic for the assembly language computer architecture.
- Comparison of Assisted Search Engines: Google & CAIN In This paper accessibility of Google search engine and CAIN is Compared and Specially Focused on the Blind Users that how the Blind Users can avail this opportunity
- Interests and RepresentationDespite unprecedented rights with regard to historical norms, women still face challenges of true government representation.
- Unilateral Neglect - Disorders of MovementAnother threatening brain disorder, in which, patients neglect a specific side of their body and/or vision is unilateral neglect.
- Understanding the Role of Identity in Urban Development Using material from Soja's "Postmetropolis" and LeGates and Stout's "City Reader," this paper seeks to understand how the contemporary city develops in terms of identity, ending with a distinctly Christian viewpoint o...
- How to Declare Integer Variables in Java
- City of Glass: Metafictional Similarities to Don Quixote
- REM (Rapid Eye Movement) and the Phenomenology of Dream Analysis
- The Dialogue of Dreams
- The Destructor - The Role of the Feminine Computerized Voice in Society and Cinema
- Dream a Little Dream of Me: What Your Dreams Really Mean
- Austrian Economics and Roundabout Processes of Production



