wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Moving clickedShapes and only clickedShapes on a panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Moving clickedShapes and only clickedShapes on a panel" Watch "Moving clickedShapes and only clickedShapes on a panel" New topic
Author

Moving clickedShapes and only clickedShapes on a panel

Kieran Murray
Ranch Hand

Joined: May 18, 2008
Posts: 47
Hi Guys,

I can not find a way of only moving the clickedShape in my code.
The code allows you to scale some drawn objects and add rectangles.
You can also move the panel around.
What would be useful now would be to just move the object that is clicked.
Unfortunately the code below does not do this.





The aim is to move all the objects when I click on the panel and just move the clickedObject when I click on it.

Kind regards,

The Apprentice
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Here's a way to explore the dragging of the geom primitives.
Kieran Murray
Ranch Hand

Joined: May 18, 2008
Posts: 47
Craig,

A tardy thank you. The code you provided is the basis of my drawing application. It is really excellent code.

Kind regards,

Kieran
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Moving clickedShapes and only clickedShapes on a panel
 
Similar Threads
Is there anyway of overriding the default signal for PopupMenus
Review of Greenhorn Code?
Problems moving shapes when set up own Shapes class extending Path2D.Double
Help with JScrollPane
Zooming in and out - cursor not in the right place