Getting and Setting an Image on the System Clipboard
import java.awt.Image; import java.awt.Toolkit; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; public class Main { public static void main(String[] argv) throws Exception { Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null); if (t != null && t.isDataFlavorSupported(DataFlavor.imageFlavor)) { Image img = (Image) t.getTransferData(DataFlavor.imageFlavor); } } }