/** Sets a textfield where the number of pages will be displayed */
 public void setPageCounterField(JTextField _field, Color _color, JComponent _button) {
   pageCounterField = _field;
   pageCounterFieldDefaultColor = _field.getBackground();
   pageCounterFieldColor = _color;
   this.pageCounterButton = _button;
   this.pageCounterButtonDefaultForeground = _button.getForeground();
 }
    /**
     * Creates a LabeledBorder instance with the specified border and label.
     *
     * @param border the border
     * @param label the label the border should display
     */
    public LabeledBorder(Border border, JComponent label) {
      super(border);

      this.label = label;

      if (label instanceof JLabel && label.getForeground() instanceof ColorUIResource) {

        label.setForeground(getTitleColor());
      }
    }