This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Conflicting Mouse Events Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Conflicting Mouse Events" Watch "Conflicting Mouse Events" New topic

Conflicting Mouse Events

George Jacobs

Joined: Nov 29, 2011
Posts: 5
I haven't done much Java GUI programming, but I have inherited a program that involves a Java GUI.

I am wondering how I can use a mouse event to draw a box on a GUI and then calculate the distance from the box to the mouse. I am trying to essentially combine these 2 programs together.

Program 2:

I am trying to replace the red rectangle with the user drawn box. I also don't need the box to be redrawn, but some sort of Calculate box. Does anybody know how I can do this in Java without all these conflicting mouse events? I really appreciate any help.
I agree. Here's the link:
subject: Conflicting Mouse Events
It's not a secret anymore!