/** Sets up the panel. */
  private void setupPanel() {

    // layout the panel
    setLayout(new GridLayout(1, 1));
    add(panelMain);

    setPreferredSize(new Dimension(-1, 35));
    setMaximumSize(new Dimension(500, 35));

    // set the scale types
    comboboxType.setModel(
        new DefaultComboBoxModel(
            (ScaleType[])
                ScaleType.getEnumList().toArray(new ScaleType[ScaleType.getEnumList().size()])));

    DefaultFormatterFactory formatterTare =
        new DefaultFormatterFactory(new NumberFormatter(formatTare));

    textfieldTare.setFormatterFactory(formatterTare);
  }