/** 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(); }