File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes why won't ie find JApplet class files? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "why won Watch "why won New topic
Author

why won't ie find JApplet class files?

Richard Agnes
Greenhorn

Joined: Feb 12, 2001
Posts: 22
I have written a simple applet, when I use awt components and extend Applet it works fine, but if I use JApplet and swing components it doesn't work, I get a loadClass not found error.
It compiles so it can't be anything to do with my classpath.
does anyone know what could be wrong:
code:
import java.applet.*;
import javax.swing.*;

class ColorSelector extends JApplet{ //when Applet it works
//code is here
}
and embedded here:
<Applet code="ColorSelector.class" codebase="." width="300" height="400">
<Param name="Red" value="140">
<Param name="Green" value="120">
<Param name="Blue" value="110">
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4120

Richard,
This is because the JVM that comes with IE does not support Java 2 classes like Swing. The only browser that does support Java 2 classes is Netscape 6... otherwise you have to use the Java plug-in from Sun, or stick to just AWT components.
HTH,
-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 3901
You will encounter the same problem trying to use Lists, Sets or Maps.


I never took notes in college. That's how I got a 4.0 the first 2 years, and a 3.5 the second two years.
 
 
subject: why won't ie find JApplet class files?
 
Threads others viewed
Mnemonics for menus in the applet
Changing the param of an applet with XSL or JS ...
Grey box on loading of applet
Communication Java-Javascript with plug-in
Tomcat and NTLM authentication
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture