?
Solved

Getting JSpinner value into integer

Posted on 2003-02-26
5
Medium Priority
?
1,206 Views
Last Modified: 2008-03-04
How do I get the value of JSpinner in a int field??
0
Comment
Question by:RdeLange
  • 3
5 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 200 total points
ID: 8027350
store it as an Integer

js.setValue(new Integer(1));

to get it back as int:

int jsVal = ((Integer) js.getValue()).intValue());
0
 

Author Comment

by:RdeLange
ID: 8027437
Thanks, this works! Only the last ) must be left.

0
 
LVL 18

Expert Comment

by:bobbit31
ID: 8027466
oh yeah, sorry ;)
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 8028213
so is this problem solved?

if so, please accept comment as answer so we can keep this topic area clean ;)
0
 

Expert Comment

by:DigitalXtreme
ID: 8049318
Hi RdeLange,

it appears bobbit31's answer helped you. please select his comment as an answer by clicking the link at the top of his post called "Accept answer as comment" and give him a grade and close it out. If no action I will do this myself in 72 hours. Thank You

DigitalXtreme
CS Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

621 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