question: public boolean importData ( JComponent comp , Transferable t ) { JTextComponent c = ( JTextComponent ) comp ; withinSameComponent = c == exportComp ; if ( withinSameComponent && c . getCaretPosition ( ) >= p0 && c . getCaretPosition ( ) <= p1 ) { shouldRemove = false ; return true ; } boolean imported = false ; DataFlavor importFlavor = getImportFlavor ( t . getTransferDataFlavors ( ) , c ) ; if ( importFlavor != null ) { try { InputContext ic = c . getInputContext ( ) ; if ( ic != null ) ic . endComposition ( ) ; Reader r = importFlavor . getReaderForText ( t ) ; handleReaderImport ( r , c ) ; imported = true ; } catch ( UnsupportedFlavorException ufe ) { ufe . printStackTrace ( ) ; } catch ( BadLocationException ble ) { ble . printStackTrace ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } } return imported ; }
target:  This method causes a transfer to a component from a clipboard or a DND drop operation. The Transferable represents the data to be imported into the component.