Results 1 to 2 of 2
  1. #1
    Manish87 is offline Member
    Join Date
    Aug 2010
    Rep Power

    Default applet class inside java.applet.* or java.awt.*


    i am new to programming in java,i had bit of confusion on the packages section of java.neways here's the thing:

    how can the applet class be a subclass/inherited from awt. panel,awt.container and awt.component ,when it actually declared in the the java.applet.* package.Is the entire awt package inside the applet package?.sorry for being sucha noob!

    i would be really gratefull towards you if you can brief me on the above topic.

    Kind Regards,

  2. #2
    ceautery is offline Member
    Join Date
    Sep 2010
    Columbus, Ohio
    Rep Power



    The applet and awt packages are separate, but you can inherit from classes in other packages. java.applet.Applet extends java.awt.Panel. From the source code:

    Java Code:
    package java.applet;
    import java.awt.*;
    //(Other imports and comments)
    public class Applet extends Panel {
    // (class stuff)
    Hope that helps.


Similar Threads

  1. java applet
    By encyclopedia in forum New To Java
    Replies: 6
    Last Post: 09-24-2010, 04:24 PM
  2. destroy an applet inside a frame
    By afraidofdark in forum Advanced Java
    Replies: 1
    Last Post: 03-28-2010, 05:41 PM
  3. How do i fix this Java applet ??????
    By danielmessick in forum JCreator
    Replies: 1
    Last Post: 03-07-2010, 01:55 PM
  4. class problen with java Applet
    By Tucan in forum Java Applets
    Replies: 7
    Last Post: 07-07-2009, 05:02 PM
  5. Replies: 3
    Last Post: 07-23-2008, 08:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts