Results 1 to 4 of 4
  1. #1
    Zaroth is offline Member
    Join Date
    Aug 2010
    Posts
    3
    Rep Power
    0

    Default New to Java Applets

    Hello all,

    I'm new to Java applets and I can't seem to find a tutorial on how to use them with multiple classes. Do I have to extend Applet for every class? What about JApplet? Do extend them for classes that have JFrames..? If anyone could give me an example with applets with multiple classes it would be greatly appreciated.

    Thanks,
    Zaroth

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: New to Java Applets

    The only class that needs to extend JApplet is the applet itself. When I've done applets before, this class has been very small. It just initiates the applet, constructs another class that produces a JPanel, and adds that JPanel to the JApplet's contentPane, handles any applet parameters that are passed in via the HTML code, and that's about it.

  3. #3
    Zaroth is offline Member
    Join Date
    Aug 2010
    Posts
    3
    Rep Power
    0

    Default Re: New to Java Applets

    Oh okay, so basically now I need to use some functions from JApplet, I was going to extend JApplet in another class, but I can't because this class already extends something else... What do I do?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: New to Java Applets

    Quote Originally Posted by Zaroth View Post
    Oh okay, so basically now I need to use some functions from JApplet, I was going to extend JApplet in another class, but I can't because this class already extends something else... What do I do?
    Obviously, don't have that class extend JApplet.

Similar Threads

  1. new to Java applets... where to start??
    By anarelle in forum Java Applets
    Replies: 12
    Last Post: 07-14-2011, 04:43 AM
  2. Java applets through proxy
    By bayan in forum New To Java
    Replies: 7
    Last Post: 04-28-2011, 10:53 AM
  3. Java Applets
    By kevinnrobert in forum Java Applets
    Replies: 1
    Last Post: 04-02-2010, 01:16 PM
  4. Java Launcher and Applets
    By Bomber_Will in forum Java Applets
    Replies: 2
    Last Post: 01-15-2010, 12:41 AM
  5. Game using Java Applets
    By SecurityCop in forum Java Applets
    Replies: 7
    Last Post: 11-27-2009, 10:34 PM

Posting Permissions

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