Category Archives: Java Applets Interview Questions

What is the sequence for calling the methods by AWT for applets| Java 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 Java Applets Interview Questions | Leave a comment

How do Applets differ from Applications| Java 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 Java Applets Interview Questions | Leave a comment

Can we pass parameters to an applet from HTML page to an appletHow| Java Applets Questions

We can pass parameters to an applet usingtag in the following way: Access those parameters inside the applet is done by calling getParameter() method inside the applet. Note that getParameter() method returns String value corresponding to the parameter name.

Posted in Java Applets Interview Questions | Leave a comment

How do we read number information from my applets parameters, given that Applets getParameter() method returns a string| Java 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 Java Applets Interview Questions | Leave a comment

How can I arrange for different applets on a web page to communicate with each other| Java 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 Java Applets Interview Questions | Leave a comment

How do I select a URL from my Applet and send the browser to that page| Java 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 Java Applets Interview Questions | Leave a comment

Can applets on different pages communicate with each other| Java 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 Java Applets Interview Questions | Leave a comment

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

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

Posted in Java Applets Interview Questions | Leave a comment

What is AppletStub Interface| Java 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 Java Applets Interview Questions | Leave a comment

How will you initialize an Applet| Java Applets Questions

Write my initialization code in the applets init method or applet constructor.

Posted in Java Applets Interview Questions | Leave a comment