+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 11

Thread: Problem with JApplet and HTML page??

  1. #1
    Learning Programmer stack is an unknown quantity at this point
    Join Date
    Mar 2007
    Posts
    42

    Question Problem with JApplet and HTML page??

    hi,

    I have a JApplet window which contains images and image icons.. and I have a problem because this window didn't appear in html page..

    i wrote these lines:

    <html>
    <applet code ="BB.class" width="900" height="600">
    </applet>
    </html>

    ..but the JApplet window didn't appear in the html page .. I see only asquare which contains X mart in the top left corner..

    Can you solve my problem??

  2. #2
    Co-Administrator John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John's Avatar
    Join Date
    Jul 2006
    Age
    21
    Posts
    5,885
    Blog Entries
    25
    Do you have the Java plugin installed for your browser? In the bottom left corner of your browser does it display an error?

  3. #3
    Learning Programmer stack is an unknown quantity at this point
    Join Date
    Mar 2007
    Posts
    42
    The bottom left corner of the browser it displays :
    Loading Java Applet Failed..
    what is the solution of this problem??

  4. #4
    Co-Administrator John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John's Avatar
    Join Date
    Jul 2006
    Age
    21
    Posts
    5,885
    Blog Entries
    25
    You can try the following:

    Upgrade your browser [Get Firefox if you don't already have it]
    Upgrade your JRE
    Try running the applet from the console, see if any errors are displayed

  5. #5
    Programmer CygnetGames is an unknown quantity at this point CygnetGames's Avatar
    Join Date
    May 2007
    Location
    York, England
    Posts
    118
    Quote Originally Posted by stack View Post
    Loading Java Applet Failed..
    This error message probably means that one of the following happened:
    • Java could not find your class file - is it in the same directory as your html page? If not, you will need to use the "classpath" attribute in your applet tag.
    • Java could not find an image that you tried to load. If you tried to load an image in your init() or start() functions, make sure you gave java the correct path to the image.
    • Something else went wrong when initialising your applet. Check your init() and start() functions to make sure there are no errors.

    If you have tried these and it still won't load, just try to make a simple applet that just fills the background red, or something. Once you have this working, copy and paste your code into this applet in small sections. You should then be able to find your error.

  6. #6
    Learning Programmer stack is an unknown quantity at this point
    Join Date
    Mar 2007
    Posts
    42
    CygnetGames, I did every thing that you wrote but, the problem remains ...!!!

  7. #7
    Co-Administrator John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John's Avatar
    Join Date
    Jul 2006
    Age
    21
    Posts
    5,885
    Blog Entries
    25
    If you run your applet from the console it will display errors. Those errors can help deduce the problem.

  8. #8
    Programmer CygnetGames is an unknown quantity at this point CygnetGames's Avatar
    Join Date
    May 2007
    Location
    York, England
    Posts
    118
    Quote Originally Posted by stack View Post
    CygnetGames, I did every thing that you wrote but, the problem remains ...!!!
    You mean you couldn't even get an applet to colour the background red?

    Try copying the source code from an online tutorial and see if you can get their code to run. If you can't get a tutorial to work, post back describing exactly what you are doing and what results you get.

  9. #9
    Learning Programmer stack is an unknown quantity at this point
    Join Date
    Mar 2007
    Posts
    42
    the tutorial didn't work in the html page!!!

  10. #10
    Co-Administrator John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John's Avatar
    Join Date
    Jul 2006
    Age
    21
    Posts
    5,885
    Blog Entries
    25
    Quote Originally Posted by Sidewinder View Post
    If you run your applet from the console it will display errors. Those errors can help deduce the problem.
    .

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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