Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MouseEntered & MouseExited code seems not to be working...Problem fixed...by myself! :D

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
current listeners:

current code snippet:

The System.out.println code is working. The second thing (timer.stop() and timer.start()) doesn't seem to be.
This is a Pong game. This checks if the ball is in the starting position. If "timer" hasn't been started, it will be in this position. Likewise for mouseExited.
Thanks,
cc11rocks

EDIT: Figured it out...Just had to change code to || instead of &&.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic