Solved

applet

Posted on 2001-08-20
10
438 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
firstswap challenge 20 77
Where to store the queries for modification of table 4 62
mysql jsp example issue 32 35
sql import cannot be resolved jsp 3 23
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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

773 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