| | |
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 button c++ class clear code color columns component consumer convert crashcourse css database design desktop development developmenthelp eclipse ee error event examples file firefox forms fractal freeze game google gui guidancer gwt html image images insight int integer java javafx javascript jetbrains julia jvm linux loan loop mac mergers method microsoft mysql netbeans newbie officefileformats online php poi printf problem programming property pyqt python rim search set software solaris sort sqlite ssl storm sun support swing textfields threads time tree ubuntu ui virtualbox virtualization web windows working wxpython







