🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2690

Re: mouse motion with drag 'n drop

#2690
From: John P. McGrath
Date: Tue, 06 Jun 2000 00:00
30 lines
1803 bytes
On Mon, 05 Jun 2000 10:02:24 -0500, Joe Fessler wrote:

> To rephrase and explain, I'm using an extension of JButton
> which wraps another object.  Using dnd, I can move the
> wrapped object from component to component, and using
> mousemotionlistener I can physically reposition the
> extended JButton(s) in the JPanel.  My efforts to combine
> the two operations have not been too successful.  It seems
> that the motionlistener grabs the first few motion events
> and then the dnd listeners kick in.  This effect makes
> perfect sense, but I'm looking for a way to implement both
> pieces of functionality.

If I understand correctly, you are trying to create two different 
mechanisms, both that can move the component.  You are using drag and 
drop to move a component from one container to another, and another to 
move the component within the container.  Is this correct?

If so, I think you will run into problems with this approach.  You have 
two listeners (yours and the drag-and-drop mechanism), and both may try 
to move the component in response to the same mouse gestures.

Is there some reason that you cannot handle moving within the container 
using the drag-and-drop mechanism as well?  I can't think of any reason 
that should not work.

-- 
John P. McGrath
<JPMcGrath@fast.net>
<jpm@nscs.fast.net>
Technical Details
Message-ID: <MPG.13a63b62a555a9e989990@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <393BC100.87AF3EB7@idir.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,7648534fe4fd6be3
X-Google-Attributes: gid1089d0,public
From: John P. McGrath <JPMcGrath@fast.net>
Subject: Re: mouse motion with drag 'n drop
Date: 2000/06/06
Message-ID: <MPG.13a63b62a555a9e989990@forums.borland.com>
X-Deja-AN: 631577081
References: <393BC100.87AF3EB7@idir.net>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.api