Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds


  Asked By: Klarissa    Date: Nov 22    Category: Java    Views: 1507

i have a problem in running applet.when i write an applet in jbuiler 2006 i can run and view it in applet viewer easily. but when i try to see it in my browser, i encountere this error: "to help protect your security internet explorer has restricted this file from showing active content that could access your computer ...." and when i click in "allow bloch content", i can't see my applet content. can anybody help me?



6 Answers Found

Answer #1    Answered By: Adelaide Fischer     Answered On: Nov 22

this is your browser issue, go to Tools --> Internet Options --> Advanced
and find an item Java (Sun): Use JRE .... for <applet> (require restart)
check this item if it is selected

also check your "security" whether it is set to high or not if it is set to high try to change the status to Medium or Low.

Answer #2    Answered By: Blake Smith     Answered On: Nov 22

I go to Tools-->Internet Options-->Advanced and checked the java console enabled (requires restart) and also check the security level to Default level (Medium). also i don't uninstalled JDK. but i can't see my applet  content. do you know what is problem?

Answer #3    Answered By: Ryder Anderson     Answered On: Nov 22

perhaps your browser's broke down, try another browser such as Firefox or Netscape to see if it works.

Answer #4    Answered By: Angelica Ramos     Answered On: Nov 22

To run your applet  in a Java-enabled browser, you need to compile your code and then create an HTML file in which you use <APPLET> tag to launch java applets.

for example
<APPLET CODE="AppletSubclass.class" width=300 height=200>
this tag tells the browser to load the applet whose Applet subclass is named AppletSubclass and the applet class is relative to the html fle that contains the <applet> tag.( ie. its class file is in the same directory as the html file)

if you put the applet's files somewhere else ( not at the same directory as the html file) use the CODEBASE attribute to tell the browser in which directory the applet's files are located.

<APPLET CODE="AppletSubclass.class" CODEBASE="someDirectory/" width=300 height=200>

Answer #5    Answered By: Lonnie Rogers     Answered On: Nov 22

i have a problem  in watching applets in browser. when i write  my applet  with sun one studio (j2sdk 1.4.0_02), in the tools->advanced java(sun) option "use java2 v1.1.4.0_02 for applet (require restart)" created and i can see my applet in browser easily. but when i change my IDE to JBuilder 2006 (jdk 1.5) my applets don't open in browser and i can't see any option like that option in browser.(i should to use jdk 1.4.2 or higher) what is the reason of this problem? and how can i recover that?

Answer #6    Answered By: Hubba Akhtar     Answered On: Nov 22

Just use setBackground() in init().

Didn't find what you were looking for? Find more on Applet Or get search suggestion and latest updates.