AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

1.4 Drag & Drop JTree

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
nicola
Guest





PostPosted: Wed Nov 12, 2003 5:50 pm    Post subject: 1.4 Drag & Drop JTree Reply with quote



I'm trying to implement dnd between two JTrees in a splitpane. When
the drag leaves the bounds of a tree I get an exception from the
dragExit method.

I've written a custom TransferHandler which works fine except for the
exception which occurs whilst the drag is not over a tree component.

Any suggestions would be greatly appreciated

Thanks

Nicola

java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTreeUI$TreeDropTargetListener.restoreComponentState
at javax.swing.plaf.basic.BasicDropTargetListener.dragExit
at javax.swing.TransferHandler$SwingDropTarget.dragExit(Unknown
Source)
at sun.awt.dnd.SunDropTargetContextPeer.processExitMessage
at sun.awt.dnd.SunDropTargetContextPeer.access$700
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchExitEvent
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent
at sun.awt.dnd.SunDropTargetEvent.dispatch
at java.awt.Component.dispatchEventImpl
at java.awt.Container.dispatchEventImpl
Back to top
ak
Guest





PostPosted: Sat Nov 15, 2003 10:44 am    Post subject: Re: 1.4 Drag & Drop JTree Reply with quote



without code sample we cant say anything.
Probably you making some mistake with DataFlavor...

"nicola" <jonesn (AT) harlosh (DOT) com> schrieb im Newsbeitrag
news:3dbaa99b.0311120950.164e7c (AT) posting (DOT) google.com...
Quote:
I'm trying to implement dnd between two JTrees in a splitpane. When
the drag leaves the bounds of a tree I get an exception from the
dragExit method.

I've written a custom TransferHandler which works fine except for the
exception which occurs whilst the drag is not over a tree component.

Any suggestions would be greatly appreciated

Thanks

Nicola

java.lang.NullPointerException
at
javax.swing.plaf.basic.BasicTreeUI$TreeDropTargetListener.restoreComponentSt

ate
Quote:
at javax.swing.plaf.basic.BasicDropTargetListener.dragExit
at javax.swing.TransferHandler$SwingDropTarget.dragExit(Unknown
Source)
at sun.awt.dnd.SunDropTargetContextPeer.processExitMessage
at sun.awt.dnd.SunDropTargetContextPeer.access$700
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchExitEvent
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent
at sun.awt.dnd.SunDropTargetEvent.dispatch
at java.awt.Component.dispatchEventImpl
at java.awt.Container.dispatchEventImpl



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.