FilledCircle - fillColor = theColor public void draw Color...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.awt.Color; import java.awt.Graphics; public class FilledCircle extends Circle { // Data members Color fillColor; public FilledCircle(int theX, int theY, int theRadius, Color theColor, Graphics theCanvas ) { super(theX, theY, theRadius, theCanvas);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fillColor = theColor; } public void draw() { Color before = canvas.getColor(); canvas.setColor(fillColor); canvas.fillOval(centerX, centerY, radius, radius); canvas.setColor(before); } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online