Blogs Tutorial

How to make a java applet

  • 1.2k views 0 today
  • 1
  • 0
ALphaslucas
Lvl 24Expert Blacksmith
13
I tried to enter this in minetorials but i couldn't so here it is!
Step 1. Making the Class/Java file
NOTE:THIS is NOT Guaranteed to work, It is most likley to work with java 6 or lower.
Ok so here is the code for two rectangles overlapping:
public class RectangleApplet extends Applet
{ public void paint (Graphics g)
{ // recover Graphics2D
Graphics2D g2 = (Graphics2D);
. . .
}
}

Step 2. Embedding it into a HTML file.
This is the easy part: just copy and paste this code:

<P>Here is My <I> First applet</I>:</P>
<APPLET CODE="RectangleApplet.class" WIDTH=300 HEIGHT=300>
</APPLET>
I hope this is a good tutorial! Thanks for looking and please Diamond or subscribe or both!

More like this

  Have something to say?

Welcome