UI components can be enabled and disabled as needed. When disabled, the UI components are considerably brightened. In addition, no events can be registered and, thus, no button actions can be performed.
Disable UI component dynamically
button.setEnabled(false); |
Enable UI component dynamically
button.setEnabled(true); |