| | |
Netbeans Input Fields
![]() |
JTextField also doesn't let you set content type (unlike TextField in Java Microedition).
Use JFormattedTextField as James suggested. You will find it in NetBeans in Palette>> Swing Controls >> FormattedField. And to set content type in Properties look for formatterFactory and use drop down menu
Use JFormattedTextField as James suggested. You will find it in NetBeans in Palette>> Swing Controls >> FormattedField. And to set content type in Properties look for formatterFactory and use drop down menu
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
•
•
Join Date: Jul 2009
Posts: 81
Reputation:
Solved Threads: 1
I just played around with the JFormattedTextField and formatterFactory, and had a look at the API. The problem though, is that it formats the text after it has already been typed in where as my aim is to completely disable any other character except numbers. Is this not possible?
At the same time, to disable input once the 10th character has been entered (max length).
Thanks again,
-Ashton.
At the same time, to disable input once the 10th character has been entered (max length).
Thanks again,
-Ashton.
why not use a JSpinner?
EDIT> misread the question, just use a JFormattedTextField as said by the other two.
EDIT> misread the question, just use a JFormattedTextField as said by the other two.
Last edited by majestic0110; Sep 30th, 2009 at 11:43 am.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
![]() |
Similar Threads
- Disable/Lock Text Input Form Fields (JavaScript / DHTML / AJAX)
- Using drop down to populate input fields (PHP)
- Validate Input Fields (PHP)
- JSP input fields and tabpage (Java)
- help Creating "input-fields" (Visual Basic 4 / 5 / 6)
- Tab control on hidden input fields (HTML and CSS)
Other Threads in the Java Forum
- Previous Thread: JTree + TextArea
- Next Thread: Learning mobile development
| Thread Tools | Search this Thread |
.net ajax api apple applet application appportability apps array automation bank binary browser c++ character class classes clear code columns compile compiler component consumer convert database design development eclipse ee error event examples firefox forms fractal freeze game givemetehcodez google gui gwt html image images int integer java javafx javascript jetbrains julia jvm lego linux loan loop looping method methods microsoft myaggfun mysql netbeans newbie officefileformats online php poi printf problem programming projectideas property pyglet pyqt python rim se search set software solaris sort sqlite sun support swing text-file textfields threads time tree ui virtualbox virtualization web windows working wxpython







