/** Draw the circle with current specifications on screen. */ private void draw() { if (isVisible) { Canvas canvas = Canvas.getCanvas(); canvas.draw( this, color, new Ellipse2D.Double( xPosition, yPosition, diameter, diameter)); canvas.wait(10); } }
/* * Draw the circle with current specifications on screen. */ private void draw() { Canvas canvas = Canvas.getCanvas(); canvas.setForegroundColour(color); canvas.fill(new Ellipse2D.Double(xPosition, yPosition, diameter, diameter)); canvas.wait(10); }