Circular Canvas

Is it possible to have a circular canvas? If so how - I've been searching google for ages and I can't find anything helpful, could someone help me out please?
[167 byte] By [nealbo101a] at [2007-11-26 16:51:32]
# 1
You could just paint just inside a specific circle. What are you trying to accomplish?
zadoka at 2007-7-8 23:19:14 > top of Java-index,Java Essentials,New To Java...
# 2
Well, images are gonna be painted onto the canvas, and they're going to move from the edge of the canvas to the center and vice versa.It seems it would be very complex to make it only be painted within the circle...on a square canvas or would it?
nealbo101a at 2007-7-8 23:19:14 > top of Java-index,Java Essentials,New To Java...
# 3
The component takes over the space of a square. If your logic keeps it in a circle and you only paint what is in the circle then what difference does it make. Also you could not worry about the shape and make sure you paint over anything that was drawn outside the circle at the
zadoka at 2007-7-8 23:19:14 > top of Java-index,Java Essentials,New To Java...
# 4

> The component takes over the space of a square. If

> your logic keeps it in a circle and you only paint

> what is in the circle then what difference does it

> make.

> Also you could not worry about the shape and make

> sure you paint over anything that was drawn outside

> the circle at the end.

Both those techniques are valid, but a third technique would be to use the graphic's object's [url=http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html#setClip(java.awt.Shape)]clip property[/url].

DrLaszloJamfa at 2007-7-8 23:19:14 > top of Java-index,Java Essentials,New To Java...