dcsimg

How can I get the size of an applet's area, as defined in HTML?

John Zukowski

To get the applet's size, use the getWidth(), getHeight(), and getDimension() methods. The getWidth() and getHeight() methods were added with Java 1.2. Keep in mind an applet is just a glorified component.