Putting a value in a JSpinner

Just a simple question....how do you insert a default value into a JSpinner?

try {
     settingsGui.spinnerPort.setValue("25");
}
catch (IllegalArgumentException iae) {
}

If i wanted to put the int value '25' in there, what would i put in? What i have above doesn't work
BaconAndCabbageAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
91mustangConnect With a Mentor Commented:
spinner.setValue(new Integer(25));
0
 
91mustangCommented:
rather:

try {
     settingsGui.spinnerPort.setValue(new Integer(25));
}
catch (IllegalArgumentException iae) {
}
0
 
CEHJCommented:
Don't have empty catch blocks - it can (if it has not already) lead to bugs that are difficult to detect
0
All Courses

From novice to tech pro — start learning today.