The user gesture or set of gestures initiating a drag-and-drop operation will vary per component, platform, and device. A DragGestureRecognizer protects you from platform dependencies by enclosing these implementation details. The instance method dragSource.createDefaultDragGestureRecognizer() obtains a recognizer and associates it with a component, action, and DragGestureListener. This example creates a subclass of a Swinglabel (JLabel). In its constructor, the necessary classes and associations are made for it to act as a drag source for either a copy or a move operation. Listeners will be discussed next. The code in Listing 12.1 represents the first steps in making any draggable component.