aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Conflicting Mouse Events" Watch "Conflicting Mouse Events" New topic
Author

Conflicting Mouse Events

George Jacobs
Greenhorn

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Conflicting Mouse Events