File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes JTextField input.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply locked New topic

JTextField input....

robin singal
Ranch Hand

Joined: Jul 18, 2007
Posts: 102

i have a JTextField and want only integer input in it using setText() method.
So what do i put in setText to do that??
for decimal input i used : taxChrBusTxt.setText(taxDecFormatter.format(chrBusInc));

taxDecFormatter is object of type DecimalFormat...


Life is short play hard.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Duplicate of this thread.
subject: JTextField input....
It's not a secret anymore!