Sun Java Solaris Communities My SDN Account Join SDN
 
The Java FAQ

Applets

 

The Java FAQ -- Applets

Copyright        Table of Contents        Chapters:   1   2   3   4   5   6   7   8   9   10   11

Outline

Applets versus Applications

Q4.1
What is an applet?

See also: Q4.7, Q4.24, JavaSoft's Security FAQ web page

Q4.2
How do applets differ from applications?

See also: Q4.3, Q4.16, JavaSoft's Security FAQ

Q4.3
Can I write Java code that works both as an applet and as a stand-alone application?

See also: Q3.1, Q4.16, Q4.17, Q4.18, Q4.20, Q11.8, JavaSoft's Security FAQ

Installing Applets

Q4.4
How do I put an applet into a web page?

See also: Q4.7

Q4.5
Can I put more than one applet in a web page?

See also: Q4.20

Q4.6
How do I use the APPLET tag if I want to show users of non-Java-enabled browsers what they're missing?

See also: Q4.4, Q4.7

Q4.7
What is the complete syntax for using the APPLET tag?

See also: the applet TAG page

Q4.8
What are the different pieces that can make up an applet, and how do I install them?

See also: Q4.9, Q4.10

Q4.9
Where can I put my applet's class files, and how do I indicate their location using the APPLET tag?

See also: Q4.8, Q4.10

Q4.10
Can I put my reusable custom classes in a special place so that many different applets can use them?

See also: Q4.8, Q4.9

Applet User Interface

Q4.11
How do I determine the width and height of my applet?

See also: Q5.1

Q4.12
How do I set the background color within the applet area?

AppletSizeExample.html

See also: Q4.13, Q5.1, Q8.9

Q4.13
How can I create a transparent background for my applet?

MatchBackgroundExample.html

See also: Q8.7

Q4.14
Can I put menus and a menu bar on my applet?

AppletMenuExample.html

See also: Q6.8, Q7.8

Q4.15
I know that cursors can be changed from within frames, but how do I change the cursor in my applet?

ChangeCursorExample.html, ChangeCursor11Example.html

See also: Q5.14

Applet Program Structure

Q4.16
Several applet methods seem special, in that I need to define them even if my own code doesn't invoke them -- what are the methods, and when (and by whom) are they invoked?

See also: Q4.17, Q4.18, Q8.1, Q8.5

Q4.17
Should applets have constructors?

See also: Q4.16, Q4.18

Q4.18
How can my applet tell when a user leaves or returns to the web page containing my applet?

InitStartStopExample.html

See also: Q4.16, Q4.17, Q9.2, Q9.3

Q4.19
How do I read number information from my applet's parameters, given that Applet's getParameter method returns a String?

NumericalParametersExample.html

See also: Q10.4

Applet Communication

Q4.20
How can I arrange for different applets on a web page to communicate with each other?

InterappletExample.html

See also: Q4.7

Q4.21
How do I select a URL from my applet and send the browser to that page?

See also: Q10.14

Q4.22
Can applets on different pages communicate with each other?

See also: Q4.20

Miscellaneous

Q4.23
Can I load an applet dynamically into a Java application, and if so, how does the applet get the parameter information it would normally get from the APPLET tag?

See also: Q5.1, Q5.2

Q4.24
Do I need any special server software or setup to deliver applets?

See also: Q4.1