public static void install(JDialog dialog, IntSetting widthSetting, IntSetting heightSetting) { int increment = ThemeSettings.FONT_SIZE_INCREMENT.getValue(); int width = widthSetting.isDefault() ? getWidthForFontIncrement(widthSetting, dialog, increment) : widthSetting.getValue(); int height = heightSetting.isDefault() ? getHeightForFontIncrement(heightSetting, dialog, increment) : heightSetting.getValue(); dialog.setSize(width, height); dialog.addComponentListener(new SizeChangeListener(widthSetting, heightSetting)); }