Create image from interaction with website

You can get information from the mouse with Robot (Java Platform SE 8 ), but I think that it will be very hard to do what you want with a browser.

You might want to use browser-side telemetry generation, like a Chrome extension, a Tampermonkey script, or a third-party tool, and then send clicks and coordinates to your sketch from the browser, rather than trying to collect data on the mouse from the sketch through the operating system.