Posted January 12, 20214 yr At the moment I'm using Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection("String here"), null); But, it's giving a java.awt.HeadlessException: at sun.awt.HeadlessToolkit.getSystemClipboard(HeadlessToolkit.java:309) I've checked some source code and It's pretty much identical. Does anyone know what is causing this and how I could solve it? Edited January 12, 20214 yr by DoctorC
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.