Java Robot class
How about a Java Robot class, then?
From a compatibility point of view, this is much better; we can write cross-platform code that will work. However, we do still have some issues. The first problem that we will come across is that dialog boxes across operating systems differ, so we will probably have to write code branches for each operating system.
Let's assume that we decide to do that; does everything work for us now? Initially yes, but when we run our test twice we find out that we have some new problems. When a file already exists, we will be asked if we want to overwrite it or save it using a new filename. This means we have to start adding more logic into our Java Robot implementation. What if we specify an alternative ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access