Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to reuse mouseClicked() in the same code to do diffrent tasks?  RSS feed

 
Laythe Chamse
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello EveryOne

How can i reuse mouseClicked() in the same code to do diffrent tasks?

This is my code:




What i need to do is:
use the mouseClicked() Method for both actions:
- Dont move the ball till it's clicked;
- Move the ball after it's clicked;

I already tried this but it's not working:


Thanks in advance
 
Laythe Chamse
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

If it's not possible would someone just tell me that what i want to do is not possible please help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!