The java.awt.datatransfer.Clipboard class

The java.awt.datatransfer.Clipboard class represents an object onto which you can put transferable objects and from which you can get transferable objects.

There's one constructor you can use to create private clipboards. However most of thhe time you'll just get the system clipboard instead:

 public Clipboard(String name)
There are also three methods that allow you to get the name of the object currently on the clipboard (only one object can be on a clipboard at a time), to get the contents of the clipboard (paste), or to set the contents of the clipboard (cut or copy):

 public String getName()
 public synchronized void setContents(Transferable contents, 
  ClipboardOwner owner)
 public synchronized Transferable getContents(Object requestor)
 

Previous | Next | Top
Last Modified April 22, 1999
Copyright 1997, 1999 Elliotte Rusty Harold
elharo@metalab.unc.edu