Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Re: JApplet + API question (http://www.velocityreviews.com/forums/t123769-re-japplet-api-question.html)

John C. Bollinger 06-27-2003 05:13 PM

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
generally not.

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.


John Bollinger
jobollin@indiana.edu



All times are GMT. The time now is 11:42 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57