Results 1 to 2 of 2
Thread: How can I cast Object as an int
- 07-17-2007, 04:52 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 26
- Rep Power
- 0
How can I cast Object as an int
I'm writing a Swing application, and I have a JSpinner object that I modeled on the SpinnerNumberModel.
There is a getPreviousValue method that returns the value of the previous number in the sequence, only in Object form!
I need to work with this number as an int.
How can I cast that Object as an int?
Thanks
- 07-18-2007, 11:20 AM #2
Member
- Join Date
- Jul 2007
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Operator < cannot be applied to java.lang.Object, Object
By Albert in forum Advanced JavaReplies: 2Last Post: 11-26-2010, 02:12 AM -
Object
By sireesha in forum New To JavaReplies: 1Last Post: 01-10-2008, 01:31 AM -
How to cast an Object into a specific type (Integer/String) at runtime
By mailtogagan@gmail.com in forum Advanced JavaReplies: 2Last Post: 12-03-2007, 01:04 PM -
Cast Error Caught (change) Class is really: java.lang.String
By barney in forum Advanced JavaReplies: 1Last Post: 08-02-2007, 04:07 PM -
Creating object of Type Object class
By venkatv in forum New To JavaReplies: 3Last Post: 07-17-2007, 03:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks