Drag and Drop - Swing Compatibility

Pavel Safrata pavel.safrata at oracle.com
Sun Apr 7 23:46:16 PDT 2013

The purpose JFXPanel, including SwingDnD, is to make FX features work 
above Swing, not providing Swing features to FX...

On 26.3.2013 20:00, Scott Palmer wrote:
> Yes.  That's it.  The thing is that the SwingDnD support for JavaFX is bridging the gap somehow already.  Is it doing something evil?
> Scott
> On 2013-03-26, at 2:39 PM, Pavel Safrata <pavel.safrata at oracle.com> wrote:
>> Hello Scott,
>> this is it, isn't it?
>> https://javafx-jira.kenai.com/browse/RT-29082
>> Thanks,
>> Pavel
>> On 26.3.2013 18:28, Scott Palmer wrote:
>>> I'm porting my mixed Swing/JavaFX app to full JavaFX.  One thing I can do in the application is drag an object from a JTree and drop it into my Scene.
>>> Swing allows me to have an arbitrary Java Object as the data in the Transferrable.  When dropped this shows up in a DragBoard with MIME type "application/x-java-serialized-object" with the object instance as the data.  The drop proceeds fine.
>>> Here's the catch.  The data object is NOT serializable.  When I try to create the equivalent DragBoard from the JavaFX side it throws an exception saying as much as soon as I call setContent on the DragBoard.
>>> How did Swing manage to create the DragBoard? Can I do the same?
>>> Scott

More information about the openjfx-dev mailing list