JComponent () { JPanel res = new JPanel(new BorderLayout()); res.setBorder(JBUI.Borders.emptyRight(JBUI.CurrentTheme.ActionsList.elementIconGap())); res.add(myMnemonicLabel, BorderLayout.WEST); res.add(myIconLabel, BorderLayout.CENTER); return res; }