public void setEnabled ( boolean b ) { super . setEnabled ( b ) ; if ( ! b ) { ( ( JSpinner . DateEditor ) getEditor ( ) ) . getTextField ( ) . setBackground ( UIManager . getColor ( "TextField.inactiveBackground" ) ) ; } }
Enables and disabled the compoment . It also fixes the background bug 4991597 and sets the background explicitely to a TextField . inactiveBackground .