void (JComponent c) { c.setForeground(JBColor.namedColor("MainToolbar.Dropdown.foreground", JBColor.foreground())); c.setBackground(COLOR); Insets insets = JBUI.CurrentTheme.MainToolbar.Dropdown.borderInsets(); Border border = new EmptyBorder(insets); c.setBorder(border); c.setOpaque(true); listener.addTo(c); }