Previous | Home | Next |
ANSWER:Applet is a dynamic and interactive program that runs inside a Web page displayed by a Java capable browser. We dont have the concept of Constructors in Applets.
ANSWER:Use the parseInt() method in the Integer Class, the Float(String) constructor in the Class Float, or the Double(String) constructor in the class Double.
ANSWER: Name your applets inside the Applet tag and invoke AppletContexts getApplet() method in your applet code to obtain references to the other applets on the page.
ANSWER: Ask the applet for its applet context and invoke showDocument() on that context object.
URL targetURL; String URLString AppletContext context = getAppletContext(); try{ targetUR L = new URL(URLString); } catch (Malformed URLException e){ // Code for recover from the exception } context. showDocument (targetURL);
ANSWER: No. Not Directly. The applets will exchange the information at one meeting place either on the local file system or at remote system.
ANSWER:
Applet: Stand Alone
Applet: Needs no explicit installation on local m/c.
Appln: Execution starts with main() method.
Applet: Execution starts with init() method.
Appln: May or may not be a GUI
Applet: Must run within a GUI (Using AWT)
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. Eg. Dimension dim = getSize (); int appletwidth = dim.width ();
Answer: The applet stub interface provides the means by which an applet and the browser communicate. Your code will not typically implement this interface.
Q.9 It is essential to have both the .java file and the .shtmll file of an applet in the same directory.
True.
False.
Answer: false
Answer: Name , value.
Answer: .shtml.
- name, height, width
- code, name
- codebase, height, width
- code, height, width
Answer: code, height, width
(a). True
(b). False
Answer: (a). True
Answer:
init() method: Can be called when an applet is first loaded.
start( ) method: Can be called each time an applet is started.
paint( ) method: Can be called when the applet is minimized or refreshed.
stop( ) method: Can be called when the browser moves off the applets page.
destroy( ) method: Can be called when the browser is finished with the applet.
Answer:
getAppletInfo( ) method: Returns a string describing the applet, its author ,copy right information, etc.
getParameterInfo( ) method: Returns an array of string describing the applets parameters.
(a). True
(b). False
Answer: (a). True
(a). True
(b). False
Answer: (a). True
Answer:
(a). Edit a Java source file,
(b). Compile your program and
(c). Execute the appletviewer, specifying the name of your applets source file.
(a). True
(b). False
Answer: (b). False
Answer:
Applet class consists of a single class, the Applet class and three interfaces:
- AppletContext,
- AppletStub
- AudioClip.
Answer:
When an applet begins, the AWT calls the following methods, in this sequence.
init( )
start( )
paint( )
Answer:
stop( )
destroy( )
Answer: drawString ( ) method.
(a). True
(b). False
Answer: (a). True
Previous | Home | Next |