Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyDocumentListener implements DocumentListener {
- public void insertUpdate(DocumentEvent e) {
- System.out.println(e.getType());
- setEnabled(false);
- }
- public void removeUpdate(DocumentEvent e) {
- if (idTF.getText().isEmpty()) {
- setEnabled(true);
- }
- }
- public void changedUpdate(DocumentEvent e) { }
- private void setEnabled(boolean enabled) {
- searchF.setEditable(enabled);
- rangeTF1.setEditable(enabled);
- rangeTF2.setEditable(enabled);
- ageTF.setEditable(enabled);
- addressTF.setEditable(enabled);
- crimebox.setEnabled(enabled);
- countrybox.setEnabled(enabled);
- genderbox.setEnabled(enabled)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement