my dog learned polymorphism*
The moose likes Applets and the fly likes create applet witout extends Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "create applet witout extends" Watch "create applet witout extends" New topic
Author

create applet witout extends

yanty asyw
Greenhorn

Joined: Nov 12, 2013
Posts: 3
i want to create an applet witout extends
can i do something like next
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41096
    
  44
No, that doesn't work; browsers expect to instantiate something that extends java.applet.Applet. Why do you want to do this?


Ping & DNS - my free Android networking tools app
yanty asyw
Greenhorn

Joined: Nov 12, 2013
Posts: 3
thanks Ulf Dittmer,
i dont like to use extends
just i want to make Applets by the way like JFrame next
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41096
    
  44
i dont like to use extends

That's not going to get you far with an OO language.
yanty asyw
Greenhorn

Joined: Nov 12, 2013
Posts: 3
i like oop , Mr Ulf Dittmer
please read this article http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html

i'm just avoid extends
i want a simple example without extends
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41096
    
  44
I'm aware of the benefits and drawbacks of interfaces vs. inheritance. From the article: The extends keyword ... should be shunned whenever possible. I agree with that, but applets are a case where it is not possible.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create applet witout extends
 
Similar Threads
convert swing to applet
null Pointer Exception from applet viewer
Unable to set label icon
Applet question - .class vs .java
I can't read clearly the label of my JButton?