JButton () { Color bg = comboBox.getBackground(); Color fg = comboBox.getForeground(); JButton button = new BasicArrowButton(SwingConstants.SOUTH, bg, fg, fg, fg) { @Override public void paint(Graphics g) { // paint events may still arrive after UI switch until the entire UI is updated if (!LafManager.getInstance().getCurrentUIThemeLookAndFeel().getId().equals("macOSLight")) { return; } Icon icon = MacIconLookup.getIcon("comboRight", false, false, comboBox.isEnabled(), comboBox.isEditable()); if (getWidth() != icon.getIconWidth() || getHeight() != icon.getIconHeight()) { Image image = IconLoader.toImage(icon, null); StartupUiUtil.drawImage(g, image, new Rectangle(0, 0, getWidth(), getHeight()), null); } else { icon.paintIcon(this, g, 0, 0); } } @Override public Dimension getPreferredSize() { Icon icon = comboBox.isEditable() ? EDITABLE_ICON : ICON; return new Dimension(icon.getIconWidth(), icon.getIconHeight()); } }; button.setBorder(BorderFactory.createEmptyBorder()); button.setOpaque(false); return button; }