protected void setDate ( Date date , boolean firePropertyChange ) { Date oldDate = this . date ; this . date = date ; if ( date == null ) { setText ( "" ) ; } else { String formattedDate = dateFormatter . format ( date ) ; try { setText ( formattedDate ) ; } catch ( RuntimeException e ) { e . printStackTrace ( ) ; } } if ( date != null && dateUtil . checkDate ( date ) ) { setForeground ( Color . BLACK ) ; } if ( firePropertyChange ) { firePropertyChange ( "date" , oldDate , date ) ; } }
Sets the date .