Java Applet Programming Question:

Can applets on different pages communicate with each other?

Tweet Share WhatsApp

Answer:

Use the getSize() method, which the Applet class inherits from the Component class in the Java.awt package. The getSize() method returns the size of the applet as a Dimension object, from which you extract separate width, height fields. The following code snippet explains this:

Dimension dim = getSize();
int appletwidth = dim.width();
int appletheight = dim.height();

Download Java Applet PDF Read All 26 Java Applet Questions
Previous QuestionNext Question
How do I select a URL from my Applet and send the browser to that page?Which classes and interfaces does Applet class consist?