Logo F2FInterview

Applet Interview Questions

Q   |   QA

Name your applets inside the Applet tag and invoke AppletContext’s getApplet() method in your applet code to obtain references to the other applets on the page.

Ask the applet for its applet context and invoke showDocument() on that context object.

URL targetURL;
String URLString
AppletContext context = getAppletContext();
try
{
 targetURL = new URL(URLString);
}
catch (MalformedURLException e)
{
 // Code for recover from the exception
}
context. showDocument (targetURL);

No, Not Directly. The applets will exchange the information at one meeting place either on the local file system or at remote system.

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();

Applet class consists of a single class, the Applet class and three interfaces: AppletContext, AppletStub, and AudioClip.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: