Using Drag and Drop in Java
One of the new features in the Java 2 area of GUI programming is drag and drop. This feature is probably familiar to users of most common windowing systems. For example, in Solaris, you can "drag" a file from one directory to another using multiple File Manager windows. Java 2 provides a similar capability. You can click on a component, and while holding down the mouse, drag it to another application and release the mouse button. You "drop" the component on the application.
Drag and drop is new to Java, and it is limited in terms of what it will support. In fact, the default implementation in Java 2 only supports text. You can write your own code to do more if you wish. The interfaces and classes for the Java 2 drag ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access