Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

applet

Posted on 2001-08-20
10
Medium Priority
?
463 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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
 
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 400 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

610 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