标签:
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); //得到系统剪贴板
String text = jTextField.getText(); //获取文本框的内容
StringSelection selection = new StringSelection(text);
clipboard.setContents(selection, null);
标签:
原文地址:http://www.cnblogs.com/wdnnccey/p/5857361.html