jython - animation problem
xtian
xtian at toysinabag.com
Thu May 23 17:51:04 EDT 2002
"Rob Hall" <bloke at ii dot net> wrote ...
> oldRect = awt.Rectangle
> newRect = awt.Rectangle
>
These lines are the problem - you're setting oldRect and newRect to
the Rectangle class, when you want them to be instances of the class.
To create new Rectangles, use
oldRect = awt.Rectangle()
or even
oldRect = awt.Rectangle(x, y, width, height)
(This is equivalent to the Java code
Rectangle oldRect = new Rectangle(x, y, width, height);
.)
> AttributeError: set instance variable as static: public int
> java.awt.Rectangle.x
To be able to set awt.Rectangle.x to a value (for the class, not an
instance), awt.Rectangle.x would have to be a static member.
Hope that helps!
xtian
More information about the Python-list
mailing list