Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can applets SWING?

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
CA
I have written some simple applets that look nice in jdk1.3 using swing. For the longest time I couldn't get the applet to work in a browser. I went to java.sun.com and the documentation indicated that a plugin was needed. Unfortunately when I wrote the applets (about 3 months ago) the only way to get the plugin was to download and install the JRE 1.3. That was fine for me (cable :)) but if the customers want to use the applets I am sure they won't stick around for a 30Mb download over a 56k connection!<br><br>I am not sure what my options are. I would like to be able to keep the nice appearance of swing but I would also like to minimize download time. I haven't checked into the latest developments on java. So forgive me if they have a small plugin for netscape and IE.<br><br>Thanks for your help.... <p>Troy Williams B.Eng.<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br>
 
Faced the same problem awhile ago, sorry there is not workaround to this (as far as i know).  iE and netscape come with there own version of the java runtime files.  Microsoft decided to build there own, which is very bad ,  and netscape just uses sun's plugin.  You can force the applet to use the sun plugin in IE, but you still face the problem of the user having to download the plug-in.<br><br>The only thing i can think of is to use jar files.  Basically these are zip files that you can store all your data in.  You could make some simple button animation stuff using photoshop or just download them of the web.  Then just hook the images up to a mouse listener...  Obvously harder than it sounds but it can work.<br>check out my stuff at <br><A HREF=" TARGET="_new"> look in here to take image files and sound files from jar in this java file<br><A HREF=" TARGET="_new"> this helps you out..........<br><br>
 
jar files would be my suggestion as well... <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
How would that work with jar files? Would you include the pluging within the jar file, if so then which file from the JRE is the plugin? I was planning on learning about and implementing jar files because I tend to have quite a few classes and I have learned from experience that it is faster to download 1 larger file then a large number of small files. <p>Troy Williams B.Eng.<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br>
 
Basically you can shove any data you want in a jar file, gifs,jpgs,wav,classes.&nbsp;&nbsp;With the jdk kit go<br>jar -cf Something.jar Something.class Picture.gif Sound.au<br><br>Then in the html document go <br>&lt;APPLET&nbsp;&nbsp;CODE = &quot;Something.class&quot; ARCHIVE = &quot;Something.jar&quot; WIDTH =&nbsp;&nbsp;HEIGHT =&nbsp;&nbsp;&gt;<br><br>This will tell the Java plugin to look first in the jar file for the class and if it cannot find it it will then look in the file Something.class<br><br>To get out Picture.gif go<br>um, somehow i misplaced the code to do this, i will have to look it up again, doh :)<br><br>The only problem with this method is that i have no idea how the microsoft version of java runtime files will treat this, you need a special bunch of html tags to load the jdk correctely, <br>take a look at<br><A HREF=" TARGET="_new"> this helps<br> <p>ackka<br><a href=mailto:tmoses@iname.com>tmoses@iname.com</a><br><a href= my site</a><br>"Do No Harm, Leave No Tracks"<br>
ICMP Summer 2000, 2600 Article<br>
<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top