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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.