void () { JPanel historyButtonWrapper = new NonOpaquePanel(new BorderLayout()); historyButtonWrapper.setBorder(ExperimentalUI.isNewUI() ? JBUI.Borders.empty(2, 3, 0, 8) : JBUI.Borders.empty(2, 3, 0, 0)); historyButtonWrapper.add(myHistoryPopupButton, BorderLayout.NORTH); JPanel iconsPanelWrapper = new NonOpaquePanel(new BorderLayout()); iconsPanelWrapper.setBorder(JBUI.Borders.emptyTop(2)); JPanel p = new NonOpaquePanel(new BorderLayout()); p.add(myIconsPanel, BorderLayout.NORTH); myIconsPanel.setBorder(ExperimentalUI.isNewUI() ? JBUI.Borders.emptyRight(8) : JBUI.Borders.emptyRight(5)); iconsPanelWrapper.add(p, BorderLayout.WEST); iconsPanelWrapper.add(myExtraActionsPanel, BorderLayout.CENTER); Border border = getBorder() == null ? JBUI.Borders.empty(JBUI.CurrentTheme.Editor.SearchField.borderInsets()) : getBorder(); removeAll(); setLayout(new BorderLayout(JBUIScale.scale(3), 0)); setBorder(border); add(historyButtonWrapper, BorderLayout.WEST); add(myScrollPane, BorderLayout.CENTER); add(iconsPanelWrapper, BorderLayout.EAST); updateIconsLayout(); }