Results 1 to 10 of 10
  1. #1
    rpark712 is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default How do I do Expo class in JCreator Applet?

    I have a a trouble making an Expo in an applet in Jcreator.
    Any suggestions?




    This is my Java code

    /**
    * @(#)Lab01.java
    *
    * //trying to make an applet using Expo
    * @author
    * @v
    */

    import java.awt.*;
    import java.applet.*;

    public class Lab01 extends Applet
    {
    public void paint(Graphics g)
    {
    Expo.drawPixel(g,100,200);
    Expo.drawPixel(g,200,200);
    Expo.drawPixel(g,300,200);
    Expo.drawPixel(g,400,200);
    Expo.drawPixel(g,500,200);
    Expo.drawPixel(g,600,200);
    Expo.drawPixel(g,700,200);
    Expo.drawPixel(g,800,200);
    Expo.drawPixel(g,900,200);
    //nearly invisible points
    Expo.drawPoint(g,100,400);
    Expo.drawPoint(g,200,400);
    Expo.drawPoint(g,300,400);
    Expo.drawPoint(g,400,400);
    Expo.drawPoint(g,500,400);
    Expo.drawPoint(g,600,400);
    Expo.drawPoint(g,700,400);
    Expo.drawPoint(g,800,400);
    Expo.drawPoint(g,900,400);
    //visible points
    }
    }




    Html source


    <html>
    <head>
    </head>
    <body bgcolor="000000">
    <center>
    <applet
    code = "Lab01.class"
    width = "1000"
    height = "650"
    >
    </applet>
    </center>
    </body>
    </html>
    Last edited by rpark712; 09-23-2011 at 04:40 AM. Reason: Needed to

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,001
    Rep Power
    20

    Default Re: How do I do Expo class in JCreator Applet?

    Pardon?
    What is your problem?
    Any errors?
    Exceptions?

  3. #3
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default Re: How do I do Expo class in JCreator Applet?

    what the heck is Expo (external jar, a class or ...)?

  4. #4
    rpark712 is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: How do I do Expo class in JCreator Applet?

    The Expo is the class

  5. #5
    rpark712 is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: How do I do Expo class in JCreator Applet?

    Quote Originally Posted by Tolls View Post
    Pardon?
    What is your problem?
    Any errors?
    Exceptions?

    When i compile the java file in to .class and execute the html file, the applet window says Applet not initialized.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,001
    Rep Power
    20

    Default Re: How do I do Expo class in JCreator Applet?

    But your question makes no sense.
    What does "making an Expo" mean?
    What is your problem?
    What errors etc are you getting?

    (Where's that "How to ask questions" link when you need it?)

  7. #7
    rpark712 is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: How do I do Expo class in JCreator Applet?

    Quote Originally Posted by Tolls View Post
    But your question makes no sense.
    What does "making an Expo" mean?
    What is your problem?
    What errors etc are you getting?

    (Where's that "How to ask questions" link when you need it?)
    i'm sorry if i'm not stating things clearly.
    I never worked with computers before so.
    The Expo class is the user-defined class.
    What I'm trying to do is to make some points in the Applet, but nothing shows up, and i can't find the errors.
    The build output for java file says "Error: Main method not found in class Lab01, please define the main method as:
    public static void main(String[] args)"

  8. #8
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default Re: How do I do Expo class in JCreator Applet?

    the class Lab01 extends the class Applet so this class doesn't need a main() method!

  9. #9
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default Re: How do I do Expo class in JCreator Applet?

    Quote Originally Posted by j2me64 View Post
    the class Lab01 extends the class Applet so this class doesn't need a main() method!
    but to start the class you must use the appletviewer called with your html-file or by opening your html-file in a browser.

  10. #10
    rpark712 is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: How do I do Expo class in JCreator Applet?

    thank you very much

Similar Threads

  1. Replies: 1
    Last Post: 10-08-2010, 02:19 AM
  2. Blank Applet on JCreator
    By mgm2010 in forum New To Java
    Replies: 0
    Last Post: 05-05-2009, 03:21 PM
  3. Applet with JCreator
    By baltimore in forum Java Applets
    Replies: 2
    Last Post: 04-18-2009, 12:40 PM
  4. Applet programs do not work in my JCreator
    By java_fun2007 in forum New To Java
    Replies: 7
    Last Post: 04-18-2009, 11:41 AM
  5. Applet in JCreator
    By mgm2010 in forum JCreator
    Replies: 0
    Last Post: 03-02-2009, 02:30 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
  •