This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Image is not resizing as well as aslo not Dragging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Image is not resizing as well as aslo not Dragging" Watch "Image is not resizing as well as aslo not Dragging" New topic
Author

Image is not resizing as well as aslo not Dragging

Keyur Bhatt
Greenhorn

Joined: Apr 14, 2013
Posts: 1
hi i am developing an application that drag image in that frame and can also resize image as per user requirement using mouse cursor.

but when i am dragging image it doesn't dragged it and show an error :

> Exception in thread "AWT-EventQueue-0" java.lang.Error: Destination
> component not connected to component tree hierarchy at
> javax.swing.SwingUtilities.convertPoint(Unknown Source) at
> logic.PictureEditor$MouseHandler.mouseDragged

this error occur when i am using following SwingUtility, point convert code :

here `PictureEditor` is name of main class of Application



and when i am using following code then it dragged whole window :



here label is Jlabel used to display image.
& all this code is inside MouseHandler class which is subclass of PictureEditor class.
and MouseHandler class extend MouseAction
m Korbel
Ranch Hand

Joined: Jun 19, 2012
Posts: 154
crossposted on SO
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Keyur, please BeForthrightWhenCrossPostingToOtherSites.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image is not resizing as well as aslo not Dragging
 
Similar Threads
Autoscrolling for marquee selection
Drawing text inside a Graphics2D shape
Drag and Drop
Problem when repainting rectangles
Scrolling Components