Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes MouseEvent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "MouseEvent" Watch "MouseEvent" New topic
Author

MouseEvent

Savio Mascarenhas
Ranch Hand

Joined: Nov 29, 2000
Posts: 108
In a mock exam it was marked true that "MouseEvents of the MOUSE_DRAGGED type may report negative values for the x and y position." Are'nt the co-ordinates +ve ?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Try it yourself.
What happens is that a mouse drag that starts in a component continues to send events to that component even after the drag has left the normal component area. The coordinates are positive relative to the upper left corner of the component so they will go negative if the drag goes past that point.
Bill
Savio Mascarenhas
Ranch Hand

Joined: Nov 29, 2000
Posts: 108
Got it Thanks !!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MouseEvent
 
Similar Threads
no mouseClicked when TransferHandler set for JLabel?
Is there anyway of overriding the default signal for PopupMenus
want to forward MouseEvents from child to parent component
How to detect right click?
MouseListener