void (@NotNull JPanel component) { JPanel textWrapper = new NonOpaquePanel(new BorderLayout()); textWrapper.add(text, BorderLayout.CENTER); text.recomputeSize(); NonOpaquePanel progressWrapper = new NonOpaquePanel(new BorderLayout()); progressWrapper.setBorder(JBUI.Borders.emptyRight(4)); progressWrapper.add(progress, BorderLayout.CENTER); component.add(textWrapper, BorderLayout.NORTH); component.add(progressWrapper, BorderLayout.CENTER); }