Creating Another Example Program

The next step toward a total understanding of the clipboard is to use the system clipboard. The second program does just that and communicates with programs that are independent of the Java program itself.

The first use of the program can be seen in Figure 11.3 where text that was typed into a TextField object was copied into the system clipboard. This text was then copied into Notepad with a paste operation.

Figure 11.3. Here you can see text that was typed into a Java program, copied into the system clipboard, and then copied into Notepad.

Listing 11.3 is the program source code. One thing to note, though, is ...

Get JavaBeans Unleashed 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.