I have a Java check box next to a text field.
When the check box gets selected, I want the text box to be enabled and when it isn't, I don't want it to be selected. I tried an if
statement with the isSelected()
method, but it didn't do anything.
How can I react to state changes of the JCheckBox?