As stated in the answer to this question, one can setup a Timeline to check whether there is a change in the system clipboard:
Set and use variables outside timeline in javafx 8
But is there a better way? For example, an event listener? I have searched JavaFx 8 doc and didn't find anything obviously helpful.
Solutions using JavaFx is preferred, but all answers are welcome.
Test:
No, there isn't a better way. There are no events sent round when the clipboard contents change (especially if it's from outside of the Java application) and so only a polling approach is appropriate.