I have a little bit localized question:
I have a Swing application in which I can add two points. What the applicaiton does is that every 100ms it saves the selected area determined by the two points from the screen (a rectangle) and compares it to a former version to see it there were any changes in that area.
So this operation does this every 100ms:
- Get area
- Create bitmap
- Compare with previous version (99%)
The point of this is that I need an operation to be done if the selected area changes. In 90% percent of the time that selected area is unchanged.
Is there a more efficient way in java / swing to add some kind of listener to check is a designated area changes? I tried to search for something similar but the search words are too general for this type of issue. (Or I am just stupid.)
There are pretty much millions of jars out there I was hoping there might be something similar that suits my needs.