public void setXEmbedDropTarget() { // Register a drop site on the top level. Runnable r = new Runnable() { public void run() { target.setDropTarget(new XEmbedDropTarget()); } }; SunToolkit.executeOnEventHandlerThread(target, r); }
static byte[] getBData(KeyEvent e) { try { if (bdataField == null) { bdataField = SunToolkit.getField(java.awt.AWTEvent.class, "bdata"); } return (byte[]) bdataField.get(e); } catch (IllegalAccessException ex) { return null; } }
public void removeXEmbedDropTarget() { // Unregister a drop site on the top level. Runnable r = new Runnable() { public void run() { if (target.getDropTarget() instanceof XEmbedDropTarget) { target.setDropTarget(null); } } }; SunToolkit.executeOnEventHandlerThread(target, r); }