Re: JApplet + API question
David Eynon wrote:
> I know that the basic methods that can be overwritten for class JApplet are
> init, and paint. However, the API does not specifically state this, and
> JApplet does not describe this right away.. How do i know with other classes
> specific methods that operate like this, simply by looking at the API first?
You "know" incorrectly. The basic methods that every JApplet developer
must consider whether to override are init(), start(), stop(), and
destroy(). It is possible to override paint() (or better, update()),
but that is often unnecessary if you write your applet to make good use
of the Swing GUI subsystem of which the JApplet class is a part. There
may be call to override other methods as well for special purposes, but
The general question seems to be "How can I tell from the API docs how
to use a class?" There is no good answer. The quality and information
content of API docs vary considerably, even within the core API. Good
API docs will explain whether and how each method is used by other
methods and other classes, and even whether and how subclasses should
override particular methods. Poor API docs may tell you nothing
whatsoever beyond field names and types and method signatures. Where
the API docs to not provide sufficient information you should seek other
sources; for the core API the Java Tutorial is often a good resource.
I hope that helps.
|All times are GMT. The time now is 05:10 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.