Our final example, at the risk of beating data transfer to death, is to implement a transferable that encapsulates a custom component.
Note: A there is a bug under the 1.2 release of the AWT that causes the following applet to throw an exception under Windows NT (it works fine under Solaris).
Our custom component will be a very simplistic image button, whose implementation we won't bother to discuss. Instead, we will simply show the implementation of ImageButtonSelection and the applet that exercises it. The complete implementation of ImageButtonSelection is listed in Example 20-5.
import java.awt.*; import ...