home *** CD-ROM | disk | FTP | other *** search
/ Java Certification Exam Guide / McGrawwHill-JavaCertificationExamGuide.iso / pc / Web Links and Code / code / chap13 / Rect.java < prev    next >
Encoding:
Java Source  |  1997-04-20  |  307 b   |  14 lines

  1. import java.awt.*;
  2. import java.applet.*;
  3.  
  4. public class Rect extends Applet {
  5.    public void paint(Graphics g) {
  6.       g.drawLine(60, 5, 60, 175);
  7.       g.drawLine(120, 5, 120, 175);
  8.       g.drawLine(5, 60, 175, 60);
  9.       g.drawLine(5, 120, 175, 120);
  10.  
  11.       g.fillRect(80, 80, 20, 20);
  12.    }
  13. }
  14.