Skip to main content

JXDatePicker "wrong" ESCAPE handling?

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2013-05-17

hi there,

i just found out that JXDatePicker swallows ESCAPE keys by ignoring it's JFormattedTextField's state.
this behaviour is generally undesirable when you'd like to bind the ESCAPE key to e.g. a dialog when it's not in editing mode;
just like JFormattedTextField it should only consume it when it's in editing mode.

a simple patch would solve this issue. just add

public boolean isEnabled() {
return cancelAction.isEnabled();

to org.jdesktop.swingx.plaf.basic.BasicDatePickerUI.EditorCancelAction.

how could i contribute that code snippet to the code base?

best regards, alex