How can I make a JButton enabled when the user types smthg in a JTextField?

Hello,
I have a JButton and a JTextField on a frame. The JButton is disabled, myButton.setEnabled(false).
How can I enable the button when the user types something in the text field? Just typing, not pressing enter.
Thank you

There isn't one, actually. What you need is a DocumentListener and you have to associate it with the document object associated with the field i.e.
field2.getDocument().addDocumentListener() (new DocumentListener() {
});

Similar Messages

Maybe you are looking for

  • Steps for BDC before  program

    Can anyone just tell me the steps which one follows before going for a BDC Program. i mean right frm the starting if any Company want to implement SAP.

  • Authorizations for Developer/ABAPer

    Are there any SAP delivered authorizations for ABAP developer on ECC 6.0 system.     For now, I have given       SAP_BC_DWB_ABAPDEVELOPER        SAP_BC_TC_DEVELOP_ALL     But, my our developer is not happy at all, complaining, she could do nothing. T

  • Adobe Form that Creates Active Directory User Account

    Hello all!  Hopefully someone can help me with this.  I am using Adobe LiveCycle Designer ES 8.2 to create a user account request form.  I have the form created and now am working on a submit button that will email the form to the approving officials

  • OAF Advance Table

    Hi, My requirement is: There is a search page based on advance table. New record can be created in advance table using add another row button and there is save button for saving the record to database. In advance table there is one column Detail of i

  • Problems extracting LR5.6  upgrade files after download

    Hello! I've just completed installing a LR5 upgrade from a DVD. After this, I downloaded the latest upgrade which i this case was is LR5.6. My problem is that I am unable to extract the files in the upgrade. I just get a message from the installer te