[QA] How to get clipboard strings in JAVA SWT

Clipboard clipboard = new Clipboard(Display.getDefault());
// copy to clipboard
clipboard.setContents(new String[]{"My Text in Clipboard"}, new Transfer[]{TextTransfer.getInstance()});
// paste from clipboard
String text = clipboard.getContents(TextTransfer.getInstance());
Tags : , ,

0 thoughts on “[QA] How to get clipboard strings in JAVA SWT”

Leave a Reply

Your email address will not be published. Required fields are marked *


two + = 4