Connecting Tech Pros Worldwide Forums | Help | Site Map

How to set enabled my JButton...?

Newbie
 
Join Date: Sep 2009
Posts: 4
#1: Oct 13 '09
My JButton will be disabled when running my program... my JButton will be enabled if the value or parameter are equal to 3...
for example: 1 value is path of the file i selected.
2 vaue is path of the directory i selected.
3 value is path of i want to be creating a output.
if this three value will complete my JButton will be going to enabled...
and i have no problem with that.

But!!!..
if i just type a words or letters let say "abcd" of the three TextField... my JButton will not be enabled what should i do to enabled my JButton even though I'm just type a words or letters...?

Any Idea...?
hope you help me.

Thanks in advance.

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Oct 13 '09

re: How to set enabled my JButton...?


You can add KeyListeners to textfields as well.
Reply


Similar Java bytes