aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes DocumentListener and Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "DocumentListener and Netbeans" Watch "DocumentListener and Netbeans" New topic
Author

DocumentListener and Netbeans

Sam Bluesman
Ranch Hand

Joined: Nov 21, 2004
Posts: 191
Hi.

I have created two jTextFields in a MainGUI class in netbeans. I have a button which starts disabled. It should only become enabled when the textfields have been updated, say length > 1.

I know I need to implement DocumentListeners to do this, but I'm not sure how I can go about doing this. I have looked at the tutorial on sun's website and the code provided but left me a little confused. I am unclear as to where the code should go seeing as I am using netbeans and much of the code defining the text fields has already been defined, nor do i know if it is possible to define through Netbeans' interface.

I was thinking maybe I have to create a textField ActionPerformed method and put the code in there, although I am unsure.

Can anyone help me?

Thanks


Moosey knows best
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Michael Kato
Greenhorn

Joined: Aug 06, 2010
Posts: 12
This is old... sorry, but it came up in my google search.

I came across a similar situation. NetBeans' GUI builder does not seem to have any way to do this so you might have to add it with another editor manually if that's exactly what you need.

http://netbeans.org/bugzilla/show_bug.cgi?id=14364
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DocumentListener and Netbeans
 
Similar Threads
Adding source code of java / struts to Netbeans
Net Beans with CVS
I face some problem with any kind of jee framework. Think my learning process is not ok.
Graphics in NetBeans IDE
classpath ?