This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
Bartender
Posts: 18468
61
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!