Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Cannot see the gui for the SingleLaneBridge java applet example

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Cannot see the gui for the SingleLaneBridge java applet example

    Hi,

    [NOTE: To see a better version of the question below please click here]

    I went to the this java site and loaded the files in a new project in netbeans 6.8 . I removed the package
    declaration and put them in the default package of the project. I tried to
    compile it by right clicking and selecting run(Shift + F6) on the
    SingleLaneBridge.java file. This program compiled without errors.

    This is what I got :




    Then I tried another method, which included copying the java files to a
    folder and compiled them manually using commandLine. Then made an html file
    and put the reference to the SingleLaneBridge.class file. Still I got a
    similar grey screen with the buttons. Then I tried again by downloading the
    pictures and the sound file (Note: All this time images and the sound file
    were called from the website):

    1)Red car

    2)Blue car

    3)Bridge

    4)Crash sound file

    Then I put the images in the folder where the notepad files were. The image
    and sound path(s) was set appropriately in the BridgeCanvas.java file so dont
    worry about that.

    After this I tried it out in Eclipse as well. But the same gray applet window
    with buttons showed up.

    I would like to see the cars and bridge in the applet, like in this site.

    Thanks for your time.

    Tlna


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Cannot see the gui for the SingleLaneBridge java applet example

    Please post link to the other forums you've posted this on.

Similar Threads

  1. Java Applet Coding Help?
    By Drag01 in forum Java Applets
    Replies: 1
    Last Post: April 26th, 2012, 07:03 AM
  2. Java Applet and MySQL
    By Terillius in forum JDBC & Databases
    Replies: 4
    Last Post: August 21st, 2010, 10:05 PM
  3. Need help with java applet game.
    By vlan in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 10th, 2010, 04:18 AM
  4. Help with 1st Java applet game!
    By Sneak in forum Java Applets
    Replies: 0
    Last Post: November 28th, 2009, 11:20 AM
  5. Designing RLC Circuit using Java Applet
    By syxxpac316 in forum Java Applets
    Replies: 6
    Last Post: May 13th, 2009, 04:26 PM