private void updatePreferredSize() {
    final int PADDING_TOP = font.getSize() + 5;

    final int lineHeight = font.getSize();

    final int height = PADDING_TOP + (registerModel.getNumberOfRegisters() * lineHeight);

    setPreferredSize(new Dimension(200, height));

    revalidate();

    updateUI();
  }
Updates the member variable that keeps track of the register with the longest name.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/JRegisterView/JRegisterView.java