Home arrow static arrow Java Programming [Archive] - JFormattedTextField
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - JFormattedTextField
This topic has 2 replies on 1 page.

Posts:46
Registered: 6/1/04
JFormattedTextField  
Aug 3, 2004 12:34 PM



 
Let's say I created the following JFormatted TextField:

fldText = new JFormattedTextField(NumberFormat.getNumberInstance());add(fldText);


When I typed in anything less than .001, the program automatically rounds to 0. However, I need to be able to type in a very small number. How do you prevent the automatic rounding from happening?
 

Posts:31,095
Registered: 4/30/99
Re: JFormattedTextField  
Aug 3, 2004 12:39 PM (reply 1 of 2)



 
By using an appropriate format, I suppose. Or by using some other component. Is there a reason you didn't post this in the Swing forum?
 

Posts:46
Registered: 6/1/04
Re: JFormattedTextField  
Aug 3, 2004 12:41 PM (reply 2 of 2)



 
OK, let me post this in the swing forum
 
This topic has 2 replies on 1 page.