Guest User

Untitled

a guest
Jun 18th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. JTextField textField = new JTextField();
  2. JRadioButton activeButton = new JRadioButton("Active");
  3. JRadioButton inactiveButton = new JRadioButton("Inactive");
  4. activeButton.addActionListener(new ActionListener()
  5. {
  6. public void actionPerformed(ActionEvent e)
  7. {
  8. textField.setEditable(true);
  9. }
  10. });
  11. inactiveButton.addActionListener(new ActionListener()
  12. {
  13. public void actionPerformed(ActionEvent e)
  14. {
  15. textField.setEditable(false);
  16. }
  17. });
Add Comment
Please, Sign In to add comment