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
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
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
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
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