I want just to paint a circle without given Circle Picture. So I just started with a new Class without picture.
Then I try this code, but it does not work.
Thanks for your help!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import greenfoot.*; public class Balls extends Actor { public Balls() { GreenfootImage image = new GreenfootImage( 70 , 70 ); image.setColor(Color.RED); image.drawOval( 100 , 100 , 70 , 70 ); image.fillOval( 100 , 100 , 70 , 70 ); this .setImage(image); } public void act() { // Add your action code here. } } |