Ok folks, i'm back. I used to be sort of semi-regular on here, but close bereavement seriously threw me off course, for a fair time. :roll: Still adjusting, as well. But anyway, i've started back on my java, and have a query on applets. It seems i've fallen at the first hurdle................... OK, i says in Sams' "learn java in 21 days" that "all applets are subclasses of either the JApplet class in the javax.swing package, or its superclass, the Applet class, in the java.applet package. The JApplet class is a better choice because it supports Swing."
What I don't get is, if the Applet class is the superclass, shouldn't this be the better choice, as being the superclass, it is all encompassing. Or am i visualising this the wrong way. And that the Swing is created lower down in a subclass from the Applet class, and is therefore not 'seen' by this superclass. I have just asked the dumbest question of the year, probably, on the most basic concept of OO programming. But folks, believe me, for me, it's been a while!
John Bonham was stronger, but Keith Moon was faster.
More specialized classes -- subclasses -- are the ones that add additional features. Now actually, I'd take strong exception to the statement you're quoting, as "better" is relative to what it is you need to do. If you want to write an applet that runs only in Sun's Java plug-in, then you can go with JApplet. If you want to run in the Microsoft VM, or the old VM that comes with Netscape, then you more or less need to stick with Applet.