Article View: borland.public.jbuilder.java.swing
Article #9457Re: Drag object in two different panel ?
From: Janene McCrillis
Date: Thu, 23 Mar 2000 00:00
Date: Thu, 23 Mar 2000 00:00
19 lines
1367 bytes
1367 bytes
In article <8bbv9h$qdd7@bornews.borland.com>, "mus" <mustafa@mimos.my> wrote: > Hiii ... > anyone know trick to drag object(jLabel) from jPanel1 to jPanel2. > When i use normal drag method drag object didn't display on jPanel2 when i > move mouse there There's a really good section on Drag-n-Drop in the Graphic Java, Volume I that I've been using for my DnD. You need to make JPanel1 a DragGestureListener and jPanel2 a DropTarget, then implement "drop" in JPanel2 to tell the panel what to do when the label is dropped there. Check out the examples in Graphic Java, they do what you're looking for. Janene McCrillis Sent via Deja.com http://www.deja.com/ Before you buy.
Technical Details
Message-ID:
<8bdov8$cif$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8bbv9h$qdd7@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,5852cba64a7b3004 X-Google-Attributes: gid111d45,public From: Janene McCrillis <janene.r.mccrillis@lmco.com> Subject: Re: Drag object in two different panel ? Date: 2000/03/23 Message-ID: <8bdov8$cif$1@nnrp1.deja.com> X-Deja-AN: 601392268 References: <8bbv9h$qdd7@bornews.borland.com> X-Http-Proxy: 1.0 x23.deja.com:80 (Squid/1.1.22) for client 204.68.140.34 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Mar 23 18:49:19 2000 GMT X-MyDeja-Info: XMYDJUIDjanene_r_mccrillis Newsgroups: borland.public.jbuilder.java.swing X-Http-User-Agent: Mozilla/4.61 [en] (WinNT; U)