Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2009
    Posts
    25
    Rep Power
    0

    Default Convert Application to Applet

    I want to turn this application (link to original code) into an applet.

    Here is what I did so far down below:
    -replaced JDialog with JApplet
    -renamed constructor to void init
    - deleted the visible true commands.



    When I run the applet on browser, i get a dark grey blank box.

    And I have been told that the Applet class will make -> TimeApplet$1.class and TimeApplet$1ButtonHandler.class after compilation.

    Thanks
    Last edited by racewithferrari; 12-12-2012 at 05:58 AM. Reason: question solved.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default Re: Convert Application to Applet

    The init() method that the Java plugin invokes on an Applet takes no arguments. You haven't overridden the method, you've overloaded it.

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

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default Re: Convert Application to Applet

    Quote Originally Posted by racewithferrari View Post
    - deleted the visible true commands.
    Java doesn't have commands. Java has statements.

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

  4. #4
    Join Date
    Oct 2009
    Posts
    25
    Rep Power
    0

    Default Re: Convert Application to Applet

    Quote Originally Posted by DarrylBurke View Post
    The init() method that the Java plugin invokes on an Applet takes no arguments. You haven't overridden the method, you've overloaded it.

    db
    Should I remove all the arguments from the public void init() and add something somewhere? I am lost.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default Re: Convert Application to Applet

    Better take some time to learn Applets then.
    Lesson: Java Applets (The Java™ Tutorials > Deployment)

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

  6. #6
    psdev is offline Member
    Join Date
    Dec 2012
    Posts
    4
    Rep Power
    0

    Default Re: Convert Application to Applet

    also make sure that when you copy and paste the code to a new project for the applet it says "extend jApplet"

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default Re: Convert Application to Applet

    Quote Originally Posted by psdev View Post
    also make sure that when you copy and paste the code to a new project for the applet it says "extend jApplet"
    JApplet, not jApplet. Java is case sensitive. Also extends, not extend.

    Please don't post half-baked advice here.

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

Similar Threads

  1. Replies: 14
    Last Post: 08-04-2012, 01:08 AM
  2. convert java application into an exe
    By masa in forum AWT / Swing
    Replies: 12
    Last Post: 11-20-2009, 04:04 AM
  3. convert application to applet in netbeans
    By dbashby in forum New To Java
    Replies: 7
    Last Post: 04-18-2009, 04:49 AM
  4. Convert to Applet
    By Urgle in forum New To Java
    Replies: 1
    Last Post: 11-12-2008, 02:15 PM
  5. Convert the application from 9i to 10g
    By rahul999 in forum JDBC
    Replies: 5
    Last Post: 09-03-2008, 04:55 PM

Tags for this Thread

Posting Permissions

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