Results 1 to 7 of 7
  1. #1
    AlphaWhelp is offline Member
    Join Date
    Jul 2011
    Posts
    4
    Rep Power
    0

    Question Applet compiles and tests fine in jGrasp... blank white screen when placed into HTML

    Not sure what the problem is. Since the Applet code works, I figure I'd post my HTML code instead and see if there is something that I did wrongly with my HTML code.

    Java Code:
    <body>
    <applet code="Tongue.class" archive="Tongue.jar" width="1000px" height="1000px">
    Java is not installed on your machine or your browser does not allow Java Applets to run.
    </applet>
    </body>
    The Jar file is in the same directory as the HTML file... what could be wrong?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,559
    Rep Power
    25

    Default

    code="Tongue.class"
    The code= attribute refers to a classname not a filename. Some browsers will look for the class.class file in the Tongue package. Remove the .class

  4. #4
    AlphaWhelp is offline Member
    Join Date
    Jul 2011
    Posts
    4
    Rep Power
    0

    Default

    these are all the packages:

    import java.awt.Graphics;
    import javax.swing.JApplet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.*;

    Tried removing .class from Tongue.class and it didn't work.

  5. #5
    AlphaWhelp is offline Member
    Join Date
    Jul 2011
    Posts
    4
    Rep Power
    0

    Default

    OMFG! >=[ that will teach me to use a stupid HTML generator ever again... the damn thing put a /html tag where there should have been a /title

    wow that makes me so angry I was tearing my hair out over this.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,559
    Rep Power
    25

    Default

    From post#2: Are there any error messages in the browser's java console?

  7. #7
    AlphaWhelp is offline Member
    Join Date
    Jul 2011
    Posts
    4
    Rep Power
    0

Similar Threads

  1. Replies: 6
    Last Post: 02-08-2011, 02:29 AM
  2. Blank screen
    By dewitrydan in forum New To Java
    Replies: 14
    Last Post: 08-12-2010, 05:19 PM
  3. JSTL and HTML White space
    By newakdev in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 02-24-2010, 05:54 PM
  4. Blank Screen while navigating from one screen to another
    By mohana.krishna in forum Java Servlet
    Replies: 0
    Last Post: 03-03-2009, 05:03 PM
  5. Errors driving me crazy! although compiles fine
    By irishsea2828 in forum New To Java
    Replies: 1
    Last Post: 04-08-2008, 03:23 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
  •