954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

applet java

hi all..i have a question ..and need help please... i have this applet code and i don't know how to use applets ....so i want to put this code in a single class if it can be made..coz i don't know anything about applets...and i want to join it with my application ..and thnx in advance
the code is

<APPLET archive="burnshow.jar" code="burnshow.class" width=500 height=400>
      <param name="maximages" value="7">
      <param name="image1" value="image1.gif">
      <param name="image2" value="image2.gif">
      <param name="image3" value="image3.gif">

      <param name="target" value="_blank">
      <param name="delay" value="2000">
      <param name="bgcolor" value="006020">
      <param name="format" value="stretch">
      <param name="direction" value="up">

      <param name="fgmax" value="1">
      <param name="fgimage1" value="6app2.gif">
      <param name="fgxmove1" value="0">
      <param name="fgypos1" value="0">
  </APPLET>

fgmax: Number of foreground images to load
fgdivide:Number of the highest layer image taht will appear below the scrolling text.
fgimage# :Optional image that will be draw in the foreground of the starfield.
fgxpos#:The X position of the foreground image.
fgypos#: The Y position of the foreground image.

and please if u can put an example for me ..and thnx

weblover
Junior Poster
141 posts since Feb 2009
Reputation Points: 10
Solved Threads: 1
 

That is an applet object tag - not Applet source code. You need the "burnshow.jar" if you're going to do anything with that at all.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

if u can please give me an example for an applet source code for my application using "burnshow.jar" ..coz i don't know how to use applets at all and i need it for my application ...coz i want to put a slide show in it ....or if there is another way to make a slide show ..i don't know ....soo i need help ..and thnx

weblover
Junior Poster
141 posts since Feb 2009
Reputation Points: 10
Solved Threads: 1
 

following code represent the simple Applet Source Code

import java.applet.*;
import java.awt.*;
import java.awt.Graphics;
/*
<applet code=applet3 height=300 width=300>
<param name="data" value="SATISH">
</applet>
*/
public class applet3 extends Applet
{
public void init()
{
setBackground(Color.gray);
}
public void paint(Graphics g)
{
String s;
Dimension d;
d= getSize();
int x,y;
x=d.width;
y=d.hight;
setForeground(Color.pink);
g.drawOval(0,0,x,y);

g.drawLine(x/2,0,0,y/2);
g.drawLine(0,y/2,x/2,y);
g.drawLine(x/2,y,x,y/2);
g.drawLine(x,y/2,x/2,0);

}
}

Compile that code and copy the class path file to your HTML Code file location and modify the HTML code as follows and open that HTML page to Browser <html>
<body bgcolor=pink>
<h1> Example of Applet With parameter </h1>
<Applet code="applet3.class" height=300 width=300 name="ap2">
</Applet>

<body>
</html>

remember both file copy to same folder otherwise it will not work OK:cool:

Enjoy Java Programming:)

hell_tej
Junior Poster in Training
53 posts since Apr 2008
Reputation Points: 15
Solved Threads: 3
 

thnx very much hell_tej but i want to use the applet in a normal java application ...as a class i mean i want to call this class from another class to show the applet when a button is pressed ..how can i do this?

weblover
Junior Poster
141 posts since Feb 2009
Reputation Points: 10
Solved Threads: 1
 

or in another way...i want to use the burnshow applet in my GUI application ...and when a button is pressed the applet will be shown ..and i don't know anything about applets...how can i do this? ...and thnx in advance..

weblover
Junior Poster
141 posts since Feb 2009
Reputation Points: 10
Solved Threads: 1
 

My Friend use Swing Components to make a desktop application with JAVA.

use NetBeans 6.0 to easiy create Database application and Desktop Application

you can get referance of it from www.netbeans.org site

hell_tej
Junior Poster in Training
53 posts since Apr 2008
Reputation Points: 15
Solved Threads: 3
 

My Friend use Swing Components to make a desktop application with JAVA.

use NetBeans 6.0 to easiy create Database application and Desktop Application

you can get referance of it from www.netbeans.org site

Agreed Swing should be used to make a GUI (Graphical User Interface) in Java, but if you are just starting out with Java never use an IDE (like NetBeans) which automates all your tasks of GUI building. Instead use a minimalistic IDE like JCreator Lite or BlueJ wherein you have to do the component organization yourself and in case you get stuck refer to the javadocs , this way you will learn a lot more about Java.
And once you have achieved mastery over these basics you can go on and use IDEs like Eclipse, NetBeans, IntelliJ, JBuilder, etc and choose which one suits you best.

stephen84s
Nearly a Posting Virtuoso
1,443 posts since Jul 2007
Reputation Points: 668
Solved Threads: 154
 
Enjoy Java Programming:)

How will he, when you won't allow him to by giving readymade code pieces ?

verruckt24
Posting Shark
952 posts since Nov 2008
Reputation Points: 485
Solved Threads: 89
 

at last ...what should i do?

weblover
Junior Poster
141 posts since Feb 2009
Reputation Points: 10
Solved Threads: 1
 
at last ...what should i do?

Read my previous post.
And you can learn here on how to create GUIs in swing without any fancy tools here .

stephen84s
Nearly a Posting Virtuoso
1,443 posts since Jul 2007
Reputation Points: 668
Solved Threads: 154
 

thnx very much

weblover
Junior Poster
141 posts since Feb 2009
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You