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!
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!
Tags |
1374006
6
Create an account or sign in to comment.