The Region class is totally revised in this aspect and strictly according to the Java Rectangle rules.
... means the Region
Region(SCREEN.w, SCREEN.h, 1, 1)
is one pixel below and one pixel right to the bottom right corner of the primary screen and hence outside any screen if there is no screen at this coordinates.
A Region must have a width and height both > 0, otherwise it is undefined (the message though for a top left corner on a screen is misleading).
*** I will fix this the way, that I will produce a sensible error message and as a convenience set the attribute being 0 to 1.
What is inconvenient, that the click on a Region/Location outside any screen leads to a null pointer exception.
*** I will change this to an exception with a better message.
Thanks for finding and evaluating:
The Region class is totally revised in this aspect and strictly according to the Java Rectangle rules.
... means the Region
Region(SCREEN.w, SCREEN.h, 1, 1)
is one pixel below and one pixel right to the bottom right corner of the primary screen and hence outside any screen if there is no screen at this coordinates.
A Region must have a width and height both > 0, otherwise it is undefined (the message though for a top left corner on a screen is misleading).
*** I will fix this the way, that I will produce a sensible error message and as a convenience set the attribute being 0 to 1.
What is inconvenient, that the click on a Region/Location outside any screen leads to a null pointer exception.
*** I will change this to an exception with a better message.