Minecraft Blogs / Tutorial

How to make a java applet

  • 1,148 views, 1 today
  • 1
  • 0
ALphaslucas's Avatar ALphaslucas
Level 24 : Expert 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!
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome