public void setTransferHandler (TransferHandler newHandler)

Sets the TransferHandler, which provides support for transfer of data into and out of this component via cut/copy/paste and drag and drop. This may be null if the component does not support data transfer operations.

If the new TransferHandler is not null, this method also installs a new DropTarget on the component to activate drop handling through the TransferHandler and activate any built-in support (such as calculating and displaying potential drop locations). If you do not wish for this component to respond in any way to drops, you can disable drop support entirely either by removing the drop target ( setDropTarget(null)) or by de-activating it ( getDropTaget().setActive(false)).

If the new TransferHandler is null, this method removes the drop target.

Under two circumstances, this method does not modify the drop target: First, if the existing drop target on this component was explicitly set by the developer to a non-null value. Second, if the system property suppressSwingDropSupport is true. The default value for the system property is false.

Please see How to Use Drag and Drop and Data Transfer, a section in The Java Tutorial, for more information.

Parameters:
newHandler    the new TransferHandler

See also:
TransferHandler, getTransferHandler

Since:  1.4

@beaninfo bound: true hidden: true description: Mechanism for transfer of data to and from the component