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

applet

 
tamer sayeh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can I use applet without extend it? I mean what is the source code of applet or from what it consist??
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi tamer,
why u want to do it?
if u do it, it will mean a browser can't really use/display "ur applet" the way it is using standard applet as browsers follow Applet api, right?

thanks
maulin
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The base applet class doesn't do anything interesting - it just provides an empty applet.
Modifying it wouldn't be a very good idea since that would cause a naming conflict with the original implementation.
Removing existing methods/members could cause it to break in inpredictable ways.
Any increase in efficiency vs. simply subclassing java.lang.Applet going to be minimal, if any.
You might could get the source code, but you wouldn't get the security rights. The original java.lang.Applet is secured within the core Java libs to ensure that no one can substitute an evil clone of it.
Applet's not unique that way - the other core Java classes also are subject to the same rules. Probably a good place to discuss the pros and cons and workarounds would the the Intermediate or Advanced Java Forums here on JavaRanch.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic