void (ActionGroup group) { super.setTabActions(group); if (myActionPanel != null) { Container parent = myActionPanel.getParent(); parent.remove(myActionPanel); parent.add(new Wrapper(myActionPanel) { @Override public Dimension getPreferredSize() { return myActionPanel.getPreferredSize(); } }, BorderLayout.WEST); myActionPanel.setBorder(JBUI.Borders.emptyLeft(6)); myActionPanel.setVisible(!showCloseActionOnHover()); } }