1833800 Members
2673 Online
110063 Solutions
New Discussion

Re: Java 2 Swing

 
Hwa N. Shen
New Member

Java 2 Swing

How do you get an applet containing Swing components to run in a browser?

For example, I ran demo/jfc/SwingApplet using appletviewer with no problems, but couldn't get applet to come up in a browser. The README file mentioned the CLASSPATH needs to be set, but where do I find where the Swing classes reside?

I am on a K460 server running HPUX-11 (64-bit). Any hints & help would be greatly appreciated!
2 REPLIES 2
Tiong-Lip Chua_1
New Member

Re: Java 2 Swing

If I am not wrong, your browswer need to install Java2 plugin which is available in the java website.
Chaviv
New Member

Re: Java 2 Swing

You need to put a swingall.jar file in the applet tag in your html file. You probably have the swingall.jar file in the lib directory of your jdk. The swingall.jar file should be ftp'ed to your web server. In the applet tag in your html file add archive="swingall.jar" and make sure the swingall.jar file is in the codebase directory of the web server. The plugin idea can work too but that may not work for all your users.