[java] Stupid message board... SWING WON'T WORK!
Ok, this time I won''t paste any code and I''ll get right to the point: I wrote an application with swing (first time) and it works with the applet viewer but when I try to load the html file (same one used for appletviewer) in my browsers (IE 5.5, NS 6.0 beta on 2 different Win98 computers) it says "Class GuessApplet not found".
I checked and I have the Java 1.2.2 runtime files installed. Here''s a link to a folder with the html file and the class files and the source code: http://home.earthlink.net/~shaggy999/applet/
Hi,
I myself have had the same problem once and had almost pulled my hair out because of it.
Swing is not inheritly supported in the browsers available today and neither is other JDK 1.2 features. There is several solutions to the problem:
1. Rewrite it in AWT (You said you already had a AWT verison so this is easy)
2. You can place the swing classes as part of the applet by defining the extra archive file swing.jar in your APPLET tag. The draw back of this is that swing.jar uses 1.6 MB of space which is much to download for an applet. swing.jar is part can be found by downloading the swing extension for Java 1.1 or is usually found in various Java distributions. I have mine from Symantec Visual Cafe 3.0
3. You can make use of Sun Java plug-ins for JDK 1.2.x. To make use of these the HTML *MUST EXPLICITLY* be written so it uses the plug-in. Sun has made a freely downloadable program called a HTML converter that replaces your own html code with the one that uses the plu-in. The problem with this apprach is that your HTML code now becomes browser specific. If you read about it on Sun's home page you may note that the plug-ins only are intended for intranet use. This is because it is hard to make the html platform independent if you use Java plug-ins.
Hope this help you. My own solution is to use AWT instead. This insures that most people is able toi see the applet.
Note: You can edit a posting you have made by clicking the edit post button above your posting.
B.Sc. Jacob Marner
Graduate Student of Computer Science, The University of Copenhagen, Denmark.
http://fp.image.dk/fpelisjac/rolemaker/
I myself have had the same problem once and had almost pulled my hair out because of it.
Swing is not inheritly supported in the browsers available today and neither is other JDK 1.2 features. There is several solutions to the problem:
1. Rewrite it in AWT (You said you already had a AWT verison so this is easy)
2. You can place the swing classes as part of the applet by defining the extra archive file swing.jar in your APPLET tag. The draw back of this is that swing.jar uses 1.6 MB of space which is much to download for an applet. swing.jar is part can be found by downloading the swing extension for Java 1.1 or is usually found in various Java distributions. I have mine from Symantec Visual Cafe 3.0
3. You can make use of Sun Java plug-ins for JDK 1.2.x. To make use of these the HTML *MUST EXPLICITLY* be written so it uses the plug-in. Sun has made a freely downloadable program called a HTML converter that replaces your own html code with the one that uses the plu-in. The problem with this apprach is that your HTML code now becomes browser specific. If you read about it on Sun's home page you may note that the plug-ins only are intended for intranet use. This is because it is hard to make the html platform independent if you use Java plug-ins.
Hope this help you. My own solution is to use AWT instead. This insures that most people is able toi see the applet.
Note: You can edit a posting you have made by clicking the edit post button above your posting.
B.Sc. Jacob Marner
Graduate Student of Computer Science, The University of Copenhagen, Denmark.
http://fp.image.dk/fpelisjac/rolemaker/
Edited by - felonius on 5/5/00 6:07:43 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement