Components and Serialization

AWT components provide built-in support for serialization. Actually, a more accurate statement is that the Java language provides support for serialization, and AWT components take advantage of that support. The AWT adds additional support for serializing event listeners associated with its components.

We won't discuss Java's support for serialization—that is beyond the scope of this book—however, we will discuss serializing AWT components because the AWT affords you the option of serializing a component's listeners along with the component itself.

Figure 11-4 shows an application initially containing a lone button. When the button is activated, the button's listener serializes the button and writes it to a file. ...

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.