This post originated from an RSS feed registered with Java Buzz
by Scott Delap.
Original Post: Drag with style in Swing
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Drag with style in Swing One very cool way to create user friendly interfaces is to provide the ability to drag and drop just about anything from, within and onto the application. MacOS X is a perfect example of a good drag and drop use. Everytime I try to drag something to drop it onto something else, it works. At least given you're not trying to perform something stupid like dropping a text file onto a game icon. Anyway, Windows and Linux let the applications implement drag and drop but they lack something MacOS X already offers: really cool visual feedback. For instance, dragging a picture from Safari, the web browser, shows a nice translucent thumbnail of the object. The user always knows what he is exactly dragging. How could we then get rid of the simplistic drag and drop cursor that Java provides us? The solution lies in the Drag n' Ghost Demo I'm about to show you...
Romain Guy adds yet another Swing demo to the mix. All the man does is crank out Swing code...