I have a JPanel that is used to render an cell in a
JTable. The DatePicker control is being used in this
JPanel. I have the terminateEditOnFocusLost
parameter set to true.
The problem occurs when I am editing a cell in the
table and click on the ... to expand the calendar
control. The button does not request focus (as it
should not), but when the calendar opens it requests
focus. This takes focus away from the JPanel that is
in in the table cell, and causes editing to be
terminated which commits the change to the cell and
causes the DatePicker to collapse. The observed
behavior when clicking ... is that the date picker
opens momentarily then quickly closes making it
impossible to edit.
I fixed this by making a change to the
BasicDatePickerUI class. The change is the addition
of the "calendarPane.setFocusable(false)" line.
It would be great if you could add this change into
the Microba distribution.
calendarPane = new CalendarPane(peer.getStyle());