If you go the clipboard way, you might want to take a look at the API for java.awt.datatransfer.StringSelection

db