public static void setMonospacedFont(Font font) {
    instance.monospacedFont = font;
    instance.monospacedFontMetrics = new JLabel().getFontMetrics(font);
  }
Centers the child component relative to its parent component.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/GuiHelper.java