Einstein

Einstein -...

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

View Full Document Right Arrow Icon
//******************************************************************** // Einstein.java Author: Lewis/Loftus // // Demonstrates a basic applet. //******************************************************************** import javax.swing.JApplet; import java.awt.*; public class Einstein extends JApplet { //----------------------------------------------------------------- // Draws a quotation by Albert Einstein among some shapes.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //-----------------------------------------------------------------public void paint (Graphics page) { page.drawRect (50, 50, 40, 40); // square page.drawRect (60, 80, 225, 30); // rectangle page.drawOval (75, 65, 20, 20); // circle page.drawLine (35, 60, 100, 120); // line page.drawString ("Out of clutter, find simplicity.", 110, 70); page.drawString ("-- Albert Einstein", 130, 100); } }...
View Full Document

Ask a homework question - tutors are online