Set Clipboard Contents
===

I am trying to figure out why setting the contents of the system clipboard won't work for me. I programmatically set the clipboard contents. When i use the output part of the code, it works. However, when i try copy/pasting in any text editor, it is blank.


    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection("hi there"), null);
		  	
	System.out.println(((String) Toolkit.getDefaultToolkit().getSystemClipboard()
					.getData(DataFlavor.stringFlavor)));