Package ui
Class GetIntegerInput
java.lang.Object
ui.GetIntegerInput
Static method to ppen an optionpane and get a valid (positive or 0) integer (int) from it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getIntegerInput
(JMenu menu, int initialValue, String message, String title, int upperLimit) Open an optionpane and get a valid (positive or 0) integer (int) from it.
-
Constructor Details
-
GetIntegerInput
public GetIntegerInput()
-
-
Method Details
-
getIntegerInput
public static int getIntegerInput(JMenu menu, int initialValue, String message, String title, int upperLimit) Open an optionpane and get a valid (positive or 0) integer (int) from it.- Parameters:
menu
- parent objectinitialValue
- initial proposalmessage
- message texttitle
- title textupperLimit
- upper limit of int - if this is negative, upper limit will be set to Integer.MAX_VALUE- Returns:
- the (+ve or 0) integer input by user, or -1 if user didn't enter anything
-