private static Action changeFontSizeAction(JTextComponent textComponent, String name, String tooltip, int size) {
    final AbstractAction abstractAction = new AbstractAction(name) {

      @Override
      public void actionPerformed(ActionEvent e) {
        changeFontSize(textComponent, size);
      }
    };

    abstractAction.putValue(Action.SHORT_DESCRIPTION, tooltip);
    return abstractAction;
  }
Create action bounded with JTextPane to decrease font size
@param textPane bounded with action
@return action
olv-gui/src/main/java/pl/otros/swing/text/FontResize.java