Category Archives: Applets Interview Questions

What is the sequence for calling the methods by AWT for applets? | Applets Questions

When an applet begins, the AWT calls the following methods, in this sequence: ? init() ? start() ? paint() When an applet is terminated, the following sequence of method calls takes place : ? stop() ? destroy()

Posted in Applets Interview Questions | Leave a comment

How do Applets differ from Applications? | Applets Questions

Following are the main differences: Application: Stand Alone, doesn’t need web-browser. Applet: Needs no explicit installation on local machine. Can be transferred through Internet on to the local machine and may run as part of web-browser. Application: Execution starts with … Continue reading

Posted in Applets Interview Questions | Leave a comment

Can we pass parameters to an applet from HTML page to an applet? How? | Applets Questions

We can pass parameters to an applet usingtag in the following way: ? <param name=?param1? value=?value1?> ? <param name=?param2? value=?value2?> Access those parameters inside the applet is done by calling getParameter() method inside the applet. Note that getParameter() method returns … Continue reading

Posted in Applets Interview Questions | Leave a comment

How do we read number information from my applets parameters, given that Applets getParameter() method returns a string? | Applets Questions

Use the parseInt() method in the Integer Class, the Float(String) constructor or parseFloat() method in the Class Float, or the Double(String) constructor or parseDoulbl() method in the class Double.

Posted in Applets Interview Questions | Leave a comment

How can I arrange for different applets on a web page to communicate with each other? | Applets Questions

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.

Posted in Applets Interview Questions | Leave a comment

How do I select a URL from my Applet and send the browser to that page? | Applets Questions

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 … Continue reading

Posted in Applets Interview Questions | Leave a comment

Can applets on different pages communicate with each other? | Applets Questions

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 … Continue reading

Posted in Applets Interview Questions | Leave a comment

Which classes and interfaces does Applet class consist? | Applets Questions

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

Posted in Applets Interview Questions | Leave a comment

What is AppletStub Interface? | Applets Questions

The applet stub interface provides the means by which an applet and the browser communicate. Your code will not typically implement this interface.

Posted in Applets Interview Questions | Leave a comment

What type of sound file formats can I use for the applets? | Applets Questions

Java v1.02 only supports the “voice format” of the .au sound files. This is also know as “µ-law, 8/16-bit, mono, 8000hz sample rate”

Posted in Applets Interview Questions | Leave a comment