JPanel (@NotNull JComponent component) { JPanel iconsPanel = new NonOpaquePanel(new GridBagLayout()); GridBag gb = new GridBag().setDefaultFill(GridBagConstraints.BOTH); iconsPanel.add(component, gb.next()); return iconsPanel; }