My humble goal is to have a date-picker in java swing that does not have hard-coded colors in it. A date-picker that delegates it's appearance to the chosen LAF.
Sob...
I am using com.toedter.calendar.JDateChooser version 1.4
With this answer i was able to get rid of green and red and black of the jtextfield.
With this, i was able to remove other annoying colors:
myDC.getJCalendar().setWeekdayForeground(null);
myDC.getJCalendar().setDecorationBackgroundColor(null);
myDC.getJCalendar().setSundayForeground(null);
Now i am stuck with the year spinner and it's unwanted colors. See:
Any clue on how to get rid of those?


The effect illustrated is a feature of the
CaretListenerimplemented byJTextFieldDateEditorand theJYearChooserparent class,JSpinField. Omit the addition of the listener to eliminate the effect; in outline:Less radically, it is also possible to invoke
removeCaretListener()on the editor.Also override the
caretUpdate()method inherited byJYearChooserto condition the effect based on a suitable boolean value.