Java Code

/* Purpose: Demonstrate squares/rectangles
 * @Author : ESBoese
 * @Version : Spring 2007
 */
import java.awt.*;              // access the Graphics object
import javax.swing.*;          // access to JApplet
public class Square extends JApplet
{
        public void paint ( Graphics g )
        {
              g.drawRect ( 0,0, 20, 20 );
        }
}

Back to Code Examples
©2006- by E.S.Boese. All Rights Reserved