void (Graphics g, AbstractButton c) { if (!(c instanceof ComboBoxAction.ComboBoxButton button)) return; FontMetrics fm = UIUtilities.getFontMetrics(button, g); int width = button.getWidth(); int height = button.getHeight(); if (button.isArrowVisible()) { width -= button.getIconTextGap() + EXPAND_ICON.getIconWidth(); } String text = layout(button, button.getText(), button.getIcon(), fm, width, height); Graphics g2 = g.create(); try { g2.setColor(button.getForeground()); if (button.getIcon() != null) { paintIcon(g, button, iconRect); } if (text != null && !text.isEmpty()) { View v = (View)button.getClientProperty(BasicHTML.propertyKey); if (v != null) { v.paint(g, textRect); } else { UISettings.setupAntialiasing(g); paintText(g, button, textRect, text); } } if (button.isArrowVisible()) { int x = ((int)textRect.getMaxX()) + button.getIconTextGap(); int y = height / 2 - EXPAND_ICON.getIconHeight() / 2; EXPAND_ICON.paintIcon(button, g2, x, y); } } finally { g2.dispose(); } }