Results 1 to 6 of 6
  1. #1
    spratana is offline Member
    Join Date
    Apr 2008
    Posts
    4
    Rep Power
    0

    Default how to add main function

    well, i need to compile applet, how can i add the main argument?

  2. #2
    spratana is offline Member
    Join Date
    Apr 2008
    Posts
    4
    Rep Power
    0

    Default

    what is the best compiler? i'm using Jcreator sould i change to intelliJEDEA or something else?

  3. #3
    bobleny's Avatar
    bobleny is offline Member
    Join Date
    Apr 2008
    Posts
    50
    Rep Power
    0

    Default

    Jcreator should have a built in compiler... Look for button to build and or run your application.
    As far as the best editor goes, you might be interested in this topic:
    What are you using to write your code?

    Good luck!
    -- www.firemelt.net --
    Cheer up, the worst has yet to come...

  4. #4
    DonCash's Avatar
    DonCash is offline Moderator
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    240
    Rep Power
    9

    Default

    Hello spratana,

    In applications, programs begin running with the first statement inside the main() block statement and end with the last closing bracket (}) that closes out the block. There is no main() method in a Java applet, so there is no set starting place for the program. Instead, an applet has a group of standard methods that are handled in response to specific events as the applet runs.
    Please take a look at this link:

    InformIT: Sams Teach Yourself Java 2 in 24 Hours > Standard Applet Methods
    Did this post help you? Please me! :cool:

  5. #5
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Applet was designed for browsers, and it has different method implementation not like desktop app...

    No method main required....

    take a look at PARAM tags.

    it is the equivalent of method main arguments.

    kind regards,
    sukatoa

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by sukatoa View Post
    No method main required....
    Only thing you have to do is, write the applet code correctly. Just you need the class file, hence no need to worry about main method.

Similar Threads

  1. Need a little help with a function!
    By Nuluvius in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 11:33 PM
  2. Replies: 1
    Last Post: 08-07-2007, 07:10 AM
  3. I want to add function
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:25 AM
  4. function name
    By osval in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 08:56 PM
  5. Replies: 1
    Last Post: 08-06-2007, 09:11 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
  •