// Program 10.2: An applet that knows how big it is
//Print out the applet's size

import java.applet.Applet;    
import java.awt.Graphics; 
import java.awt.Dimension;


public class getSizeApplet extends Applet {

  public void paint(Graphics g) {

    Dimension d = size();
    int AppletHeight = d.height;
    int AppletWidth = d.width;
    
    g.drawString("This applet is " + AppletHeight + 
      " pixels high by " + AppletWidth + " pixels wide.", 
      15, AppletHeight/2);
    
  }

}
