void (Component c, Graphics g, int x, int y) { Color background = getBackground(); if (background != null) { if (g instanceof Graphics2D) { ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } g.setColor(background); int arc = (int)Math.ceil(scaleVal(5)); g.fillRoundRect(x, y, getIconWidth(), getIconHeight(), arc, arc); } var icon = (!isSelected() || mySelectedIcon == null || ExperimentalUI.isNewUI()) ? myIcon : mySelectedIcon; icon.paintIcon(c, g, x + (getIconWidth() - icon.getIconWidth()) / 2, y + (getIconHeight() - icon.getIconHeight()) / 2); }