I am using Netbeans Swing GUI builder to design my app's GUI. I have a JTextField tf
and a JCheckBox cb
.
Now, I want that the tf
is enabled only when the cb
is both enabled and selected.
I am performing the below steps to perform this in Netbeans:
- Right click on
tf
>> Properties >> Binding - Click on button
...
at the right ofenabled
Binding Source: tf
Binding Expression: ${selected}
Now, in the above steps, binding expression can be set either to ${selected}
or to ${enabled}
.
But according to my needs, the binding expression should be something like ${selected} && ${enabled}
.
I tried the above expression too but it didn't work.
How can I do that through Netbeans?