Clipboard Problem - HeapByteBuffer

Ryan Cuprak rcuprak at
Wed Jul 10 09:00:19 PDT 2013

 I have a question - I have been running into a problem with the clipboard (randomly) where I get a java.nio.HeapByteBuffer instead of the object that I am expecting. I am trying to implement copy/paste within a TableView.

// Define the custom format 
private static final DataFormat columnDescriptorFormat = new DataFormat("ColumnDescriptor");
// Copy the data (invoked from a context menu) - object being placed into the clipboard implements Externalizable 
ClipboardContent content = new ClipboardContent();

// Paste logic - second line often fail
Clipboard clipboard = Clipboard.getSystemClipboard();
Object obj = clipboard.getContent(columnDescriptorFormat) // Often an instance of HeapByteBuffer instead of a column descriptor

 Any idea under what circumstances a HeapByteBuffer would be returned instead?



More information about the openjfx-dev mailing list