Putting a value in a JSpinner

Posted on 2004-04-25
Last Modified: 2012-06-27
Just a simple do you insert a default value into a JSpinner?

try {
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
Question by:BaconAndCabbage
  • 2

Accepted Solution

91mustang earned 20 total points
ID: 10912573
spinner.setValue(new Integer(25));

Expert Comment

ID: 10912576

try {
     settingsGui.spinnerPort.setValue(new Integer(25));
catch (IllegalArgumentException iae) {
LVL 86

Expert Comment

ID: 10912690
Don't have empty catch blocks - it can (if it has not already) lead to bugs that are difficult to detect

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
base64 decode encode 12 119
stackato and cloud 4 64
netstat -ano | find "8000" and taskkill /f /pid 2984 3 29
expectj telnet failing 5 19
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now