void (Container parent, int y) { if (myProgressComponent != null) { Dimension size = myProgressComponent.getPreferredSize(); if (myProgressDisabledButton == null) { myProgressComponent.setBounds(0, (parent.getHeight() - size.height) / 2, parent.getWidth(), size.height); } else { Dimension buttonSize = myProgressDisabledButton.getPreferredSize(); int x = 0; setBaselineBounds(x, y, myProgressDisabledButton, buttonSize); x += buttonSize.width + myOffset.get(); setBaselineBounds(x, y, myProgressComponent, size, parent.getWidth() - x, size.height); } return; } int x = 0; boolean buttons = false; for (Component component : myButtonComponents) { if (!component.isVisible()) { continue; } Dimension size = component.getPreferredSize(); setBaselineBounds(x, y, component, size); x += size.width + myButtonOffset.get(); buttons = true; } int width = parent.getWidth(); if (buttons) { x -= myButtonOffset.get(); x += myBeforeButtonOffset.get(); width -= x; } Dimension baseSize = myBaseComponent.getPreferredSize(); myBaseComponent.setBounds(x, parent.getInsets().top, width, baseSize.height); if (myBaseComponent instanceof JLabel label) { label.setToolTipText(width < baseSize.width ? label.getText() : null); } }