Results 1 to 4 of 4
  1. #1
    JavaPete is offline Member
    Join Date
    Oct 2012
    Posts
    9
    Rep Power
    0

    Default New to Applet use

    Hi everyone,
    New to Java, been going through a lot of examples and now I wanted to try out the Applet section. However, all the codes that I copy from a book or site when I use them
    don't give me any errors but only that it doesn't find the main class. Now I know in Java we use Public static void main, but in an applet I read that it is not the same.
    So why am I getting such a message.
    Im using Netbeans for your info.
    Im also waiting for my JavaFX 2.x book, and I get the feeling this will be answering my question. In another post I saw something about using FX for applets, is this part of my solution ? to use the FX modules ?
    Last edited by JavaPete; 11-16-2012 at 12:04 AM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: New to Applet use

    You need to go through this Tutorial Lesson: Java Applets (The Java™ Tutorials > Deployment)

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    JavaPete is offline Member
    Join Date
    Oct 2012
    Posts
    9
    Rep Power
    0

    Default Re: New to Applet use

    thanks Db,
    I've actually been at the site and copied the first Hello World exercise expecting it to work. But I get the ''No main class found'' message.
    Of course I am being lazy and have not gone throught the whole tutorial yet, except I would have figured that showing such code at the start would actually work.
    Is it because other information is required that will be explained later in that tutorial ?
    I only question now because I figure if its too complicated, I will just keep learning the basics of Java for now. Mind you I'm not a student, just learning this as a hobby and having a lot of fun with it. And since I see that HTML is involved, I have not even touched on that stuff.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: New to Applet use

    An Applet has no need nor use for a public static void main(String[] args) method. You need to go through the entire tutorial trail.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 30
    Last Post: 08-26-2011, 09:05 PM
  2. applet working in applet viewer, not browser
    By plasticfood in forum Java Applets
    Replies: 4
    Last Post: 06-24-2011, 06:47 PM
  3. Replies: 2
    Last Post: 09-29-2009, 03:33 PM
  4. Calling another applet on click of button in one applet
    By niteshwar.bhardwaj in forum Java 2D
    Replies: 1
    Last Post: 02-19-2009, 12:54 PM
  5. Replies: 4
    Last Post: 06-08-2007, 06:15 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
  •