Previous | Next | Trail Map | Writing Applets | Contents

Common Applet Problems (and Their Solutions)

This section covers some common problems that you might encounter when writing Java applets. After each problem is a list of possible solutions.

Problem: Applet Viewer says there's no <APPLET> tag on my HTML page, but it really is there.

Problem: I recompiled my applet, but my applet viewing application won't show the new version, even though I told it to reload it. Problem: The light gray background of my applet causes the applet to flicker when it's drawn on a page of a different color. Problem: The Applet getImage method doesn't work. Problem: Now that I've copied my applet's class file onto my HTTP server, the applet doesn't work. Problem: I can't get my applet to run. The browser displays a ClassCastException. Other problems that affect applets are discussed in the Creating a User Interface(in the Creating a User Interface trail) trail. Specifically, look at whichever of the following sections are related to your problem: Common Component Problems(in the Creating a User Interface trail), Common Layout Problems(in the Creating a User Interface trail), Common Graphics Problems(in the Creating a User Interface trail).


Previous | Next | Trail Map | Writing Applets | Contents