Results 1 to 4 of 4
  1. #1
    bodylojohn is offline Member
    Join Date
    Nov 2013
    Posts
    37
    Rep Power
    0

    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):
    Java Code:
    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:
    XML 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 http://www.javaprogrammingforums.com...tml#post138197

  2. #2
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,870
    Rep Power
    5

    Default Re: JApplet content blocked

    Are you sure it is the applet that is blocked and not the Java plugin that you have? Browsers nowadays tend to block Java plugins once a new version of Java is released because otherwise it is sooooooo insecure.

    Do you get the same problem in different browsers? (IE, Firefox, Chrome)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    bodylojohn is offline Member
    Join Date
    Nov 2013
    Posts
    37
    Rep Power
    0

    Default Re: JApplet content blocked

    problem solved.

    In the java console I set security to medium.

    Thanks everybody!!

  4. #4
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,870
    Rep Power
    5

    Default Re: JApplet content blocked

    Hm, good job figuring it out and thanks for reporting back.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Threads Blocked
    By alexj001 in forum Advanced Java
    Replies: 0
    Last Post: 01-03-2012, 09:39 AM
  2. apple blocked by UAC ?!?
    By newbie_jar in forum Java Applets
    Replies: 1
    Last Post: 11-15-2011, 04:10 PM
  3. Replies: 1
    Last Post: 04-19-2011, 08:52 AM
  4. JFrame to JApplet or JApplet to JApplet
    By ramesh.8189 in forum AWT / Swing
    Replies: 13
    Last Post: 02-08-2009, 06:14 AM

Posting Permissions

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