The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Suggestion

Posted by Kishori Sharan on April 06, 2001 at 1:32 PM

Mouse pressed event will always occurs before mouse clicked. I would suggest you to go by only one way. However, you can do your way too. In mouse pressed event store the x, y coordinates and a flag that mouse pressed occurred. In mouse clicked just compare x, y with x, y stored from mouse pressed. If they are same it means you have to go by mouse clicked event else you have to go by mouse pressed and released .

Thanx
Kishori



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us