JTextField « JCheckBox « Java Swing Q&A





1. How can I enable/disable my JTextField depending of the state of a JCheckBox?    stackoverflow.com

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 ...

2. I want to make JTextField part of checkbox or hook them together somehow    stackoverflow.com

I am making a Java application where I show a couple of checkboxes with relevant item from a file. Based on the selection I have to modify the original file accordingly. ...

3. How to Enable and Disable JtextField on Selection of Checkbox    java-forums.org

Use addActionListener api of JCheckBox for this. You will have to provide an implementation of ActionListener interface. In the actionPerformed method of ActionListener implementation, you need to write your logic. Something like which you have written in your post. Try on your own and if still you are stuck, then come back.