Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Making JTextField accept an INT?
Joined: Oct 24, 2005
Mar 24, 2006 07:36:00
Is this possible?
I'm trying to use the set text method to put an integer value in a
and getting the incompatibility error, is this possible or is there another method I'm not aware of?
Joined: Jan 17, 2006
Mar 24, 2006 07:43:00
you could use:
myTextField.setText("" + myInt);
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Joined: Sep 16, 2005
Mar 24, 2006 07:45:00
You can use String.valueof(integer), or use
's format method if you want commas added: 12,333 etc...
There is no emoticon for what I am feeling!
Don't get me started about those stupid
subject: Making JTextField accept an INT?
Setting hot keys
cloning swing components
Which data structure is best suited for this?
length of a jtextfield
Setting Up a JTextField to only accept Integers - Solution! (with Questions)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013