void () { WrapLayout layout = new WrapLayout(FlowLayout.LEFT, 0, JBUI.scale(TOP_INSET)); layout.setFillWidth(true); JPanel mainPanel = new JPanel(layout); for (JComponent component : myComponents) { mainPanel.add(component); } add(mainPanel); JPanel panel = new JPanel(new BorderLayout()); panel.add(myHintLabel, BorderLayout.WEST); JBDimension size = new JBDimension(100, 15); panel.setMinimumSize(size); panel.setPreferredSize(size); panel.setBorder(JBUI.Borders.emptyLeft(getLeftInset())); add(panel); }