public void paintIcon(Component c, Graphics g, int x, int y){ Graphics2D g2 = (Graphics2D)g; . . .}
Shape s = . . .;g2.draw(s);