Re: JApplet + API question

Discussion in 'Java' started by John C. Bollinger, Jun 27, 2003.

  1. 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
    John C. Bollinger, Jun 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Olander

    Re: JApplet + API question

    Eric Olander, Jul 7, 2003, in forum: Java
    Replies:
    1
    Views:
    468
    Sudsy
    Jul 8, 2003
  2. Andrew Thompson
    Replies:
    0
    Views:
    412
    Andrew Thompson
    Aug 5, 2003
  3. Cheok Yan Cheng

    ImageIcon.paintIcon wont work in JApplet

    Cheok Yan Cheng, Aug 13, 2003, in forum: Java
    Replies:
    0
    Views:
    1,757
    Cheok Yan Cheng
    Aug 13, 2003
  4. Maria Laura Re

    Help With JApplet Problem!

    Maria Laura Re, Dec 7, 2003, in forum: Java
    Replies:
    1
    Views:
    2,496
    Andrew Thompson
    Dec 7, 2003
  5. Ryan Stewart

    GUI countdown timer in a JApplet?

    Ryan Stewart, Dec 23, 2003, in forum: Java
    Replies:
    2
    Views:
    866
Loading...

Share This Page