private void restoreFromKeypress(final KeyEvent keyEvent,final int keyNumber){
  if (keyEvent.isAltDown()) {
    final int arrayIndex=(keyNumber > 0 ? keyNumber : MAX_RECENT_MESSAGES) - 1;
    if (arrayIndex < recentMessages.size()) {
      displayMessage(recentMessages.get(arrayIndex));
    }
    keyEvent.consume();
  }
}

private void restoreFromKeypress ( final KeyEvent keyEvent , final int keyNumber ) { if ( keyEvent . isAltDown ( ) ) { final int arrayIndex = ( keyNumber > 0 ? keyNumber : MAX_RECENT_MESSAGES ) - 1 ; if ( arrayIndex < recentMessages . size ( ) ) { displayMessage ( recentMessages . get ( arrayIndex ) ) ; } keyEvent . consume ( ) ; } }
restores message from the key event .
