aspose file tools
The moose likes Beginning Java and the fly likes limiting input from a textfield??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "limiting input from a textfield???" Watch "limiting input from a textfield???" New topic
Author

limiting input from a textfield???

raymond yadao
Ranch Hand

Joined: Jan 29, 2001
Posts: 88
Hi...
How would i do to limit the input for a textfield?
For example, i used the constructor:
TextField tf = new TextField(10);
still it doesn't limit the input(let say 10 characters)??
thanks!
raymond
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1721
This may not be exactly what you want, but if you happen to use Swing instead of AWT, there's javax.swing.InputVerifier that can handle this sort of validation.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: limiting input from a textfield???
 
Similar Threads
Need to limit the text
JTextField set size limit.
Input Textfield Background Color When the Cursor Is There
want to set limitation column at textfield/textarea(Urgent)
JTextField(int col)