void (Container parent) { Dimension baseSize = myBaseComponent.getPreferredSize(); int top = parent.getInsets().top; int y = top + myBaseComponent.getBaseline(baseSize.width, baseSize.height); if (!leftOrder) { layoutRightOrderContainer(parent, y); return; } int x = 0; int calcBaseWidth = calculateBaseWidth(parent); if (myBaseComponent instanceof JLabel label) { label.setToolTipText(calcBaseWidth < baseSize.width ? label.getText() : null); } baseSize.width = Math.min(baseSize.width, calcBaseWidth); myBaseComponent.setBounds(x, top, baseSize.width, baseSize.height); if (myProgressComponent != null) { Dimension size = myProgressComponent.getPreferredSize(); setBaselineBounds(parent.getWidth() - size.width, y, myProgressComponent, size); return; } int lastX = parent.getWidth(); for (int i = myButtonComponents.size() - 1; i >= 0; i--) { Component component = myButtonComponents.get(i); if (!component.isVisible()) { continue; } Dimension size = component.getPreferredSize(); lastX -= size.width; setBaselineBounds(lastX, y - myYOffset, component, size); lastX -= myButtonOffset.get(); } }