Dimension () { if (UIUtil.isUnderIntelliJLaF() || StartupUiUtil.isUnderDarcula()) { return super.getPreferredSize(); } if (myEditorField != null) { final Dimension preferredSize = new Dimension(myEditorField.getComponent().getPreferredSize()); JBInsets.addTo(preferredSize, getInsets()); return preferredSize; } return new Dimension(100, 20); }