home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / earthlink / nscomm / java40.jar / java / awt / Canvas.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  742 b   |  17 lines

  1. package java.awt;
  2.  
  3. public class Canvas extends Component {
  4.    public synchronized void addNotify() {
  5.       if (super.peer == null) {
  6.          super.peer = ((Component)this).getToolkit().createCanvas(this);
  7.       }
  8.  
  9.       super.addNotify();
  10.    }
  11.  
  12.    public void paint(Graphics var1) {
  13.       var1.setColor(((Component)this).getBackground());
  14.       var1.fillRect(0, 0, super.width, super.height);
  15.    }
  16. }
  17.