Answers

Question and Answer:

  Home  Swing AWT

⟩ What is the purpose of Transfer Handler Class?

TransferHandler class is used for data transfer and it provides an easy way to transfer the data from the Jcomponent. All the details of the data are contained in the class and it support the classes as well. Components are provided with the default handler that can create own handler of their own. There are three methods that can be used to use theTransferHandler on a component and these are as follows:

• setDragEnabled(boolean)- this turn the drag support that is given as false and it defines the component that support the drag facility that links to the list given by Jlist.

• setDropMode(DropMode)- is used to configure the drop locations and determine the use of Jlist, Jtable, Jtree.

• setTransferHandler(TransferHandler)- is used to allow the plug in data to be imported or exported by using the Jcomponent that is defined for it.

 143 views

More Questions for you: