I want to be notified if a string is copied to the system clipboard. When a new string is copied from the same source application, the FlavorListener won\'t get an event. To
The previous answer is close to be working.
The real cure is to instead just monitor the event of ownership change. By the monitor's occupying the clipboard as owner when monitoring the clipboard, so when any application changes the clipboard, the ownership would change, so this would reliably indicate the clipboard content change. However, this approach must have sufficient wait to work, (200 ms was found to be working) after an ownership change event before accessing the clipboard and re-occupying the clipboard.
This solution was provided and proved to be working by marc weber at http://www.coderanch.com/t/377833/java/java/listen-clipboard
I have verified for my purpose. If needed, I can post the solution here.
Yu