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

Recommended Answers

All 11 Replies

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.

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

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

commented: giving direct code instead of helping the O.P. write on his own. -1
commented: @ person below, Giving direct code is one way of helping the O.P. Stop giving negative reps for dumb reasons. +10

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?

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

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

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.

Enjoy Java Programming:)

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

at last ...what should i do?

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.

thnx very much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.