Local Clipboards

In Example 20-1, we manipulated the system clipboard. You can also create local clipboards by invoking the lone Clipboard constructor that takes a string as an argument. The string specifies the name of the clipboard, so that you can keep track of several clipboards if need be. As we saw in Table 20-2, the Clipboard class comes with a getName method so that you can determine which clipboard you currently have in hand.

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.