# On the repaint event of a paintable canvas component, this will create a circle with a gradient background color of orange and white.
from java.awt import Color
from java.awt import GradientPaint
from java.awt.geom import Ellipse2D
g = event.graphics
# Body
innerBody = Ellipse2D.Float(8,8,72,72)
#### Scale graphics to actual component size
dX = (event.width-1)/100.0
dY = (event.height-1)/100.0
g.scale(dX,dY)
# Paint body
g.setPaint(GradientPaint(0,40,Color.WHITE, 0,100, Color.ORANGE,1))
g.fill(innerBody)
g.setColor(Color.ORANGE)
g.draw(innerBody)