I have some text fields an an ok and cancel buttons. I want the program in such a way that the ok button is disabled what there in no nothing in the text field an becomes enabled when somthing is typed into the text field. Also when the cancel button is pressed, ann the numbers ib the text field get erased. Could someon come to my aid, please. Thank you. Kwesi.
posted 12 years ago
i've done a similar thing by adding a document listener to the text field with the following method
and then i've got another method which is called everytime the textfield is updated which contains the logic to determine whether the button is enabled / disabled........