Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用从剪贴板获取数据,getSystemSelection()但它正在返回null。大多数参考资料说某些平台不支持这一点。有没有其他选择?
getSystemSelection()
null
这是我当前的代码:
Clipboard c = Toolkit.getDefaultToolkit().getSystemSelection(); System.out.println(c.getData(DataFlavor.stringFlavor).toString());