GraphicsDemo

GraphicsDemo - canvas.drawOval(200, 200, 50, 75);...

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

View Full Document Right Arrow Icon
import static java.lang.System.out; import java.awt.Color; import java.awt.Graphics; import javax.swing.JApplet; public class GraphicsDemo extends JApplet { public void init() { setSize(500,500); } public void paint( Graphics canvas ) { canvas.drawRect(200, 20, 10, 100 );
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: canvas.drawOval(200, 200, 50, 75); canvas.setColor(Color.RED); canvas.fillRect(100, 300, 15, 15); IsoscelesRightTriangle t = new IsoscelesRightTriangle(300, 300, 50, 50, canvas); t.draw(); } }...
View Full Document

Ask a homework question - tutors are online