Originally posted on 2020-10-27
Need to copy something to the clipboard? This static method will do it all. No need for any additional libraries and you can copy any text you want, even if it isn't on the screen.
You can add it to a button or something like this:
Button.create("Copy something")
.addClickListener(evt -> CopyToClipboard.copyThis("testing123"));