Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing Applets without Plugin?

 
Jordan Drew
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanted to write a Swing Applet for a client's site, and am now realizing that Swing is not supported by IE or Netscape without requiring a plug-in.
Can anyone tell me if there is a way to get Swing Applets to run on individual version 4 and 5 browsers without requiring users to download a plug-in?
Any help would be appreciated.
Thanks,
Jordan
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jordan,
Sure. Just add about 2.5Mb to your jar file and include the javax.swing.* packages into it.
Regards,
Manfred.
 
Jordan Drew
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK here's a follow up question to that...If my JApplet only used for example, JButtons, could I just put the JApplet and JButton class into my jar file, thus greatly reducing the size of the jar?
Thanks again,
Jordan
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would have to put JApplet, JButton, and any classes they use into the jar file... it would actually be much easier to develop the applet in AWT, or use the plug-in.

-Nate
 
Peter Gragert
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have recently read a book wich had build a 'class(es)' to inspect an application and tell (or builds) all used classes and tried it successfully on examples. But I 'forgot' in which one ... ;-(
(not writing down where this valuable stuff came from, if I get this back I will tell).
 
Tim Holloway
Saloon Keeper
Posts: 18365
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, let's see. JButton invokes the plaf classes, probably the locale classes, graphics layering and rendering classes.... By the time you're done including all that, it'll probably end up being most of the Swing jar anyway.
I don't expect Microsoft to volunteer to make Swing part of its basic Java support - seeing as it now has none. But it would have been nice if at least Netscape would realise that Java Version 1.02 is just a little too archaic!
 
Peter Gragert
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found back:
Java-servlets, is the title of the book.y McGraw-Hill by Mark Moss.
name of java files: RollCall.java
together with CreateArchive.java.
Input a 'class' output which classes are called (recursivly done) if extra parameter a jar file containing all the classes is generated.
If interested in only the two files mail me!
 
Sita Kodali
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Peter,
Could you please post the code of those 2 java files (RollCall.java and CreateArchive.java)
Thanks
--
Venkat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic