So I have a 100-pixel diameter circle that should respond to mouse clicks by growing or shrinking by 10 pixels according to its state. The circle is either in a growing state or a shrinking state; it starts in the shrinking state. It should remain in the shrinking state until it reaches a diameter of 50 and then change to the growing state. Then it should remain in the growing state until it reached a diameter of 100 and then changes back to the shrinking state.
So my TA said that the way we would do this is: If-Else
I'm extremely new to java and haven't done a lot of if-else statements. I tried setting it up this way and playing around with the code inside mouseClicked but when I click on the circle, nothing happens.
Any help would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire