Dimension (Component component, int width) { Dimension size = new Dimension(width, Math.max(JBUI.scale(30), component.getMinimumSize().height)); component.setMinimumSize(size); if (component instanceof RawCommandLineEditor) { ((RawCommandLineEditor)component).getTextField().setColumns(0); } return size; }