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 4 of 4

Thread: JApplet content blocked

  1. #1
    Member
    Join Date
    Nov 2013
    Posts
    34
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default JApplet content blocked

    I just created an applet that I want to call from a html file.

    The applet code looks like this (and works):
    package jav12;
     
    import java.awt.*;
     
    import javax.swing.*;
     
    public class Welcome extends JApplet {
     
    	public Welcome(){
     
    }
    	public void init() {
    		getContentPane().add(new Label("Yessss it works",Label.CENTER));
    	}
     
    }

    The html looks like this:
    HTML Code:
    <html>
    <head>
    <title>
    welcome
    </title>
    </head>
    <body>
    jav12.Welcome is getting loaded here.....
    
    <applet
    codebase="."
    code="jav12.Welcome"
    name="Welcome"
    width="500"
    height="500"
    hspace="0"
    vspace="0"
    align="middle">
    </applet>
    </body>
    </html>
    When I click on the html file the content of the page is blocked and the applet isn't loaded.

    What can I do to fix this.
    I think it has something to do with rights.

    This is a crosspost to JApplet content blocked


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: JApplet content blocked

    Thanks for showing the cross post.

    This sounds like a browser security setting, not a Java problem. Investigate that and let us know what you find out.

  3. #3
    Member
    Join Date
    Nov 2013
    Posts
    34
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: JApplet content blocked

    problem solved.

    In the java console I set security to medium.

    Thanks everybody!!

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: JApplet content blocked

    Glad that worked, and thanks for letting us know.

Similar Threads

  1. Replies: 47
    Last Post: December 4th, 2013, 12:46 PM
  2. Re: GUI Freeze D3D Screen Updater thread blocked
    By Shoji Kuzukami in forum AWT / Java Swing
    Replies: 4
    Last Post: June 25th, 2013, 03:05 PM
  3. GUI Freeze D3D Screen Updater thread blocked
    By davef3 in forum AWT / Java Swing
    Replies: 4
    Last Post: May 24th, 2013, 10:24 AM
  4. apple safari blocked java plugin
    By macko in forum Java Theory & Questions
    Replies: 0
    Last Post: January 12th, 2013, 04:40 AM
  5. Thread Blocked
    By Rakesh_Yadav in forum Threads
    Replies: 1
    Last Post: February 19th, 2010, 11:54 AM