void (RunListPopup popup, int number) { Action action = createNumberAction(number, popup, myDefaultExecutor); Action action_ = createNumberAction(number, popup, myAlternativeExecutor); popup.registerAction(number + "Action", KeyStroke.getKeyStroke(String.valueOf(number)), action); popup.registerAction(number + "Action_", KeyStroke.getKeyStroke("shift pressed " + number), action_); popup.registerAction(number + "Action1", KeyStroke.getKeyStroke("NUMPAD" + number), action); popup.registerAction(number + "Action_1", KeyStroke.getKeyStroke("shift pressed NUMPAD" + number), action_); }