TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Java Applet

Page: 1 Reply
Jun 6th 2003#107034 Report
Member since: Feb 12th 2003
Posts: 29
hello i was wondering how i would cerate a java applet that enabled me to draw diffrent shapes like like circles and rectangles does anyone know how to do this are a tut that might help?
Reply with Quote Reply
Nov 27th 2003#130728 Report
Member since: Nov 6th 2001
Posts: 240
use this in your favorite applet editor, the code below is very basic, you could easily draw multiple shapes with for loops, color the shapes etc .... I use JCreator .....

--------

import java.awt.*;
import java.applet.*;


public class Circles extends Applet {

public void init() {
}

public void paint(Graphics g) {
// this is a circle
g.drawOval(10,10,50,50);

// and here we have a rectangle
g.drawRect(50,50,100,100);
}
}



---------------
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum