-
DND - Custom drag gesture recognizer
I have a JButton as a drag source and would like to invoke a custom drag gesture
recognizer to initiate the drag gesture when the user clicks the JButton.
However, when I try to create an instance of the drag gesture recognizer
from either method below I get returned a null instead of an instantiated
class!?
(1)
myDragGestureRecognizer = (MyDragGestureRecognizer)dragSource.createDragGestureRecognizer(
MyDragGestureRecognizer.class, button, DnDConstants.ACTION_COPY_OR_MOVE,
this );
or (2)
myDragGestureRecognizer =
Toolkit.getDefaultToolkit().createDragGestureRecognizer(MyDragGestureRecognizer.class,
dragSource, button, DnDConstants.ACTION_COPY_OR_MOVE, this);
Can anyone tell me how to create the custom drag gesture recognizer? Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks