Applets Section Index | Page 4
How can I open an applet in a new window when a web page is opened, vs. in the main window?
You can use JavaScript and use the
window.open() method to open a secondary page containing the Applet.
The code looks something like this.
<html>
<head><title></title>
...more
Where can I find any code-snippets for the new common DOM API for the JDK 1.4 Plug-in?
The second section of Chapter 25 of the Java Plug-In developer guide: Java-to-JavaScript Communication has a code snippet.more
How do I create an applet that loads in a 1.1 browser from the 1.4 JDK?
The 1.4 JDK creates class files that are incompatible with the 1.1 runtime. Prior versions of the JDK defaulted to the old version. 1.4 defaults to the new (1.2) format. To generate an applet comp...more
How can I run Java applets in Windows XP?
Sun offers the Java Plug-in for free via their Get Java program at http://java.sun.com/getjava/download.html.
How do I disable the Java 1.4 Plug-In to use the original, underlying Microsoft VM?
Under the Tools menu, select the Internet Options option. Then select the Advanced tab. You'll need to scroll down about half way until you see the little Java logo next to Java (Sun). To disable ...more
Can I create applets with Visual J#?
Nope. This tool doesn't generate Java byte codes. Instead, it works with .NET.
How can I display a Windows CHM help file from an applet?
You can use showDocument() to show any file that a browser to display. The key to displaying a CHM (.chm) file is to make sure the web server sets the appropriate content/MIME type. How to do this...more
How can I increase the amount of heap memory available to my applets for appletviewer?
When started from the command line, you can pass "java" options by using the -J command-line option. Combining the -Xmx option with -J, you get the following:
appletviewer -J-Xmx64m example.html
more
How do you detect if the Java Plug-in is installed from JavaScript?
Igor Polevoy answered this in the JDC forums. Basically, you need to write a little loader applet to see what version it uses, then have JavaScript ask the applet if IE and check for installed bro...more
What does the class hierarchy of the Applet class look like?
The inheritence hierarchy of the java.applet.Applet class is as follows:
+-----------+
| Object |
+-----------+
|
+-----------+
| Component |
+-----------+
|
+-----------+
| Contai...more
Can I display a PNG image in an applet?
PNG support is not native to Java until 1.3. If you want to display it with a prior version of Java, like the 1.1 VM found in browsers, you must find support elsewhere. One such source is Jimi.
Fo...more
How can I detect the space used by the warning bar of a window created by an untrusted applet?
The getInsets() method reports the space used by the window's decorations like the title bar and any message bar. The value isn't valid until the applet is realized/displayed.more
Why am I getting a securityy exception when calling System.getProperties()?
Untrusted applets cannot call System.getProperties(). They must get individual applet properties. Either ask for the specific property you want, assuming it is available from an applet, as not all...more
How do you play audio data contained in a byte[]?
The Java Sound API contains support for playing byte arrays. Given that this question was submited to the Applets FAQ, I'm assuming you're not using a Java runtime new enough to support that. If y...more
In Java 1.4, can applets enable and disable assertions?
Yes. There are no required permissions to enable or disable assertion checking. This permits the applet to only access/alter classes from the same classloader, so doesn't expand access in any way....more