question: @ SuppressWarnings ( "deprecation" ) private void startSetTimeChanged ( ) { int hours = 0 ; int minutes = 0 ; try { hours = Integer . parseInt ( startHoursField . getText ( ) ) ; } catch ( Exception e ) { JOptionPane . showMessageDialog ( this , ( Bundle . getMessage ( "HoursError" ) + "\n" + e ) , Bundle . getMessage ( "ErrorTitle" ) , JOptionPane . ERROR_MESSAGE ) ; log . error ( "Exception when parsing hours Field: " + e ) ; return ; } if ( ( hours < 0 ) || ( hours > 23 ) ) { JOptionPane . showMessageDialog ( this , ( Bundle . getMessage ( "HoursRangeError" ) ) , Bundle . getMessage ( "ErrorTitle" ) , JOptionPane . ERROR_MESSAGE ) ; return ; } try { minutes = Integer . parseInt ( startMinutesField . getText ( ) ) ; } catch ( Exception e ) { JOptionPane . showMessageDialog ( this , ( Bundle . getMessage ( "HoursError" ) + "\n" + e ) , Bundle . getMessage ( "ErrorTitle" ) , JOptionPane . ERROR_MESSAGE ) ; log . error ( "Exception when parsing hours Field: " + e ) ; return ; } if ( ( minutes < 0 ) || ( minutes > 59 ) ) { JOptionPane . showMessageDialog ( this , ( Bundle . getMessage ( "MinutesRangeError" ) ) , Bundle . getMessage ( "ErrorTitle" ) , JOptionPane . ERROR_MESSAGE ) ; return ; } long mSecPerHour = 3600000 ; long mSecPerMinute = 60000 ; Date tem = clock . getTime ( ) ; int cHours = tem . getHours ( ) ; long cNumMSec = tem . getTime ( ) ; long nNumMSec = ( ( cNumMSec / mSecPerHour ) * mSecPerHour ) - ( cHours * mSecPerHour ) + ( hours * mSecPerHour ) + ( minutes * mSecPerMinute ) ; clock . setStartSetTime ( startSetTimeCheckBox . isSelected ( ) , new Date ( nNumMSec ) ) ; changed = true ; }
target:  Method to handle start set time check box change