JPanel () { MyComponent component = new MyComponent(isCompact, processName); if (isCompact) { component.setLayout(new BorderLayout(2, 0)); createCompactTextAndProgress(component); component.add(createButtonPanel(ContainerUtil.map(eastButtons, b -> b.button)), BorderLayout.EAST); component.setToolTipText(info.getTitle() + ". " + IdeBundle.message("progress.text.clickToViewProgressWindow")); } else { component.setLayout(new BorderLayout()); processName.setText(info.getTitle()); component.add(processName, BorderLayout.NORTH); processName.setForeground(UIUtil.getPanelBackground().brighter().brighter()); processName.setBorder(JBUI.Borders.empty(2)); final NonOpaquePanel content = new NonOpaquePanel(new BorderLayout()); content.setBorder(JBUI.Borders.empty(2, 2, 2, info.isCancellable() ? 2 : 4)); component.add(content, BorderLayout.CENTER); content.add(createButtonPanel(ContainerUtil.map(eastButtons, b -> withBorder(b.button))), BorderLayout.EAST); content.add(text, BorderLayout.NORTH); content.add(progress, BorderLayout.CENTER); content.add(text2, BorderLayout.SOUTH); component.setBorder(JBUI.Borders.empty(2)); } UIUtil.uiTraverser(component).forEach(o -> ((JComponent)o).setOpaque(false)); if (!isCompact) { processName.recomputeSize(); text.recomputeSize(); text2.recomputeSize(); } return component; }