Solved

applet

Posted on 2001-08-20
10
427 Views
Last Modified: 2013-12-29
hi experts,

My Java applet is not running in Internet explorer.. but it is running in Netscape..
Also the Background sound is audible in Internet Explorer only not is Netscape..
Html code is given below
<html>
<head>
<bgsound src="abc.mp3" loop="-1" >
</head>
<body bgcolor ="black" text = "yellow" alink ="yellow" vlink="yellow">
<applet code ="Applet1.class" width=750 height=200>
</applet>
<font color="yellow"><h1 align = "right"><a href="pqr.asp">Enter </a></h1></font>
</body>
</html>

pls comment..
regs..
0
Comment
Question by:pvraj
10 Comments
 
LVL 4

Expert Comment

by:Oliver_Dornauf
ID: 6408882
i think the bgsound for netscape is only mid. (And not so good style in a web page :-) )

for yout applett problem you should open the java console and send the messages to this forum.
0
 
LVL 1

Expert Comment

by:dviji
ID: 6409878
If you want to play mp3 then your browser should have the plugin otherwise it is not possible. Download load the plugin and install it. In netsacpe if you want to load the plugin you have to use <EMBED> tag.

For applet problem as Oliver mentioned see your java console.

..dviji

0
 
LVL 3

Expert Comment

by:randyd
ID: 6415090
the applet tag should be expanded for each type of browser.

there is a utility that does the conversion for you...

you get an applet tag like this:

<!-- CONVERTER VERSION 1.3 --><object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="750" height="200" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<param name="CODE" value="Applet1.class">
<param name="ARCHIVE" value="http://yourhost/Applet1.jar">
<param name="type" value="application/x-java-applet;version=1.3"><param name="scriptable" value="false"><comment>
<embed type="application/x-java-applet;version=1.3" code="Applet1.class" archive="http://yourhost/Applet1.jar" width="276" height="190" scriptable="false" pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><!--
<APPLET CODE = "Applet1.class" ARCHIVE = "http://yourhost/Applet1.jar" WIDTH = "276" HEIGHT = "190"> </APPLET> --><!--"END_CONVERTED_APPLET"--></comment></object>


hth

randy
0
 
LVL 4

Expert Comment

by:Oliver_Dornauf
ID: 6416397
randy the applet tag you mentioned ist for the java-plugin from sun. You not need this in every case.
0
 

Author Comment

by:pvraj
ID: 6421236
i got confused
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 4

Expert Comment

by:Oliver_Dornauf
ID: 6421259
Confused about what ?

1) it is not possible to play mp3 without a plugin
2) To help you with your applett problem more information is needed. Noone can know why your applett not work when not get an error message.
So aktivate in the IE the java console. Use extras, Internetoptions, tab extendet mark at java vm java console.
reboot.
Select in menue view the java console.
OK ?
0
 

Author Comment

by:pvraj
ID: 6426685
Hi Oliver i m sorry .. i could not resolve it.. let me describe the problem i am facing..
import java.awt.*;
import java.awt.image.BufferedImage;
import java.applet.Applet;
public class Applet3 extends Applet
{    
     
     final static int Ball_radius =70;
     Image ball = null;
     Image applet = null;
     Graphics appG,ballG;

     public void paint(Graphics g)
     {
           setBackground(Color.black);
           if (ball==null)
    {
applet = new BufferedImage(getBounds().width, getBounds().height,BufferedImage.TYPE_INT_RGB);
ball = new BufferedImage(Ball_radius,Ball_radius,BufferedImage.TYPE_INT_RGB);
ballG = ball.getGraphics();
ballG.setColor(Color.green);
appG = applet.getGraphics();
appG.setColor(Color.black);
for(int i=-20;i<=0;i++)
  {
    ballG.drawOval(i,i,Ball_radius+((-1)*2),Ball_radius+((-1)*2));
  }
}
for(int x=0;x<400;x++)
{
     double angle =((double)x)/20;
     int y = (int)(Math.abs(Math.sin(angle))*80);
     appG.setColor(Color.white);
     appG.fillRect(0,0,getBounds().width,getBounds().height);
     appG.setColor(Color.red);
     appG.drawImage(ball,x,80-y,this);
     g.drawImage(applet,0,0,this);
    }
  }

}
this is the program for a bouncing ball..
1) As you suggested i tried to activate the java console from the view menu.. but nothing is happening there... when i clicked the java console from the view menu, it is simply closing the menu... then i went to tools-> internet opetion and there i set the java permissiion to low safety.. still nothing happened.. i even tried by downloading IE again from internet..
2) secondly when the same program i tried in Netscape it is displaying that it could not load the applet got a security violation..
3) When i tried to view the applet using Appletviewer it is showing the applet cause an exception in the native code ........
pls comment
 
0
 
LVL 4

Accepted Solution

by:
Oliver_Dornauf earned 100 total points
ID: 6427813
Pvraj you need to overide the init fuction for your applet.
Look at the documentation for details.

public void init() {

}


0
 

Expert Comment

by:CleanupPing
ID: 9061821
pvraj:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 20

Expert Comment

by:Venabili
ID: 9332828
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for Oliver_Dornauf

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Venabili
EE Cleanup Volunteer
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now