How to Run Applet in Eclipse?
How
to Run Applet in Eclipse?
Step
1. Create a new java project MyApplet.
Step
2. Create a new class FirstApplet.
Step
3. Select super class java.Applet.
Step
4. Write a code as below.
import java.applet.Applet;
import java.awt.Graphics;
public class FirstApplet extends Applet
{
public void paint(Graphics g)
{
g.drawString("This is my
first Applet using Eclipse.", 10, 50);
}
}
Step
5. Go to Run à Run Configurations…
Step
6. Select new applet configuration.
Step
7. In main tab select project and applet name.
Step
7. In parameters tab set height, width and
other parameter.
Step 8. Click Run
Comments
Post a Comment