Netbeans Input Fields

Reply

Join Date: Jul 2009
Posts: 81
Reputation: AshtonHogan is an unknown quantity at this point 
Solved Threads: 1
AshtonHogan AshtonHogan is offline Offline
Junior Poster in Training

Re: Netbeans Input Fields

 
0
  #11
Sep 30th, 2009
Am I missing something here?

However you will not able to set content type like NUMBER, ANY, EMAIL. For that you will need add on library
Sorry I meant text field not text area.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,191
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Netbeans Input Fields

 
-1
  #12
Sep 30th, 2009
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
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 81
Reputation: AshtonHogan is an unknown quantity at this point 
Solved Threads: 1
AshtonHogan AshtonHogan is offline Offline
Junior Poster in Training

Re: Netbeans Input Fields

 
0
  #13
Sep 30th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,293
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Netbeans Input Fields

 
0
  #14
Sep 30th, 2009
why not use a JSpinner?
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!
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 81
Reputation: AshtonHogan is an unknown quantity at this point 
Solved Threads: 1
AshtonHogan AshtonHogan is offline Offline
Junior Poster in Training

Re: Netbeans Input Fields

 
0
  #15
Sep 30th, 2009
Hi majestic0110,

I think it's cool that you have 1,234 posts but you didn't read my previous reply as to why I can't use the JFormattedTextField.

Thanks,
-Ashton.
Last edited by AshtonHogan; Sep 30th, 2009 at 11:49 am.
Reply With Quote Quick reply to this message  
Reply

Tags
gui, java, swing, textfields, ui

Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC