QUOTE(alpha02 @ 7 Oct, 2007 - 07:42 AM)

Hi thanks for the reply... i donīt get any errors..but when i try to open it in an apple it just wont start.... below is the message i get....
----jGRASP exec: appletviewer jgrasphta.htm
java.lang.ClassCastException: Square
at sun.applet.AppletPanel.createApplet(AppletPanel.java:721)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:650)
at sun.applet.AppletPanel.run(AppletPanel.java:324)
at java.lang.Thread.run(Thread.java:595)
----jGRASP: operation complete.
this is what im trying to do...
1. Write a class Square that represents a square to be drawn. Store the following information in instance variables:
ı size (length of any side)
ı x coord of upper left-hand corner
ı y coord of upper left-hand corner
ı color
write an applet DrawSquares that uses your Square class to create and draw 5 squares. This code should be very
simple; the paint method will simply create 5 Squares and then draw it. Don't forget to pass the Graphics object to draw.