Applets Section Index | Page 2
Can I use CAB files with the Java Plug-in?
No. CAB file support is specific to the Microsoft runtime. If you want to bundle your class files together with the Java Plug-in, you should use JAR files instead.
How can I maintain a single instance of an object in an applet?
In start(), instead of always creating a new object, return the existing one if it exists or create a new one if it doesn't.
I have a class clientSocket that connect to the Server, sends some data and receives some data.
I have a class clientSocket that connect to the Server, sends some data and receives some data.
When I run this class from Applet within HTML page it's run fine under IE (4.0) NT env, but if i run...more
After calling the getAudioClip() method of Applet, when is the AudioClip loaded?
Until you try to play an audio clip, the AudioClip is not loaded.
How can applets from different codebases on the same HTML page communicate with each other?
You can use JavaScript and LiveConnect as a bridge. Let's say you have applet A and applet B. You should write 2 JavaScript called sendMessageToA(var s) and sendMessageToB(var s). Then applet A ca...more
How can I attach the jdb debugger to an applet running in the Java Plug-in?
Details are available from http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/debugger.html. Basically, you need to setup some configuration options within the Plug-in control panel be...more
How do I package Java extensions with applets? Do I have to unjar them and rejar them with the applet JAR file?
In the manifest file for the JAR file which loads the applet, you can specify an Extension-List attribute. Then, for each extension, there is a series of lines to add for each. One of these lines ...more
If my applet needs multiple JAR files, is there any way to optimize the download?
Consider indexing the .jar file. See http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#JAR Index for more information about indexing. Basically, use the -i option when you create the JAR file.more
Can I use CAB files and JAR files with the same applet?
You can specify tags to load both types of files, but only one tag will be used.
How do I initiate a JNDI lookup from an applet?
First, in the jar file of your applet you will need followin classes included:
Classes from the jar with the client portion of your specific jndi provider classes
Classes from the the jar conta...more
How do I change the default message that appears when the Java Plug-in loads an applet?
You can specify a custom text message by providing a BOXMESSAGE attribute to the tag that loads the applet. If the text message is the empty string, no message will be displayed.
With the Java Plug-in, how do I change the default applet window background color?
The special BOXCOLOR attribute allows you to change the background color. You can use any constant from the Color class or specify the RGB value as a comma-delimited list:
BOXCOLOR="cyan"
BOXCOLO...more
With the Java Plug-in, how to do I change the font color for the messages when the applet is loading?
Use the BOXFGCOLOR attribute to specify the color. You can use any constant in the Color class or specify the RGB value as a comma-delimeted list.
With the Java Plug-in, how to I change the progress bar color?
The progress bar color can be changed by specifying a PROGRESSCOLOR attribute in the tag that loads the applet. You can use the color constants of the Color class, like "cyan", or specify the RGB ...more
Netscape Communicator browsers permit automatically starting the Java runtime at browser startup by specifying a -java command-line option. Is there any way to auto-start the Java Plug-in at browser startup with Internet Explorer, instead of having to wait until first needed?
Since the Sun Java Plug-in is third party code for IE, Microsoft could not anticipate your wish and reserve command-line parameters for it.
What you could do is include an applet on your start pag...more