I've done some searching on google and here at this site but haven't found an answer to this one. I need to position a small tooltip-like JWindow relative to a textfield on the screen. My algorithm needs to place this JWindow so that it's visible regardless of the position of the textfield that it is associated with - so if the textfield appears very near the right hand side of the screen, the JWindow will be positioned so it is completely visible. I've got it working pretty well except when the JWindow is to be positioned near the start menu. I'm using the following call to get the screen size:
Now that call returns my screen dimensions without any regard for where the Start Menu (or the application menu on the Mac) is located. If I'm running at 800x600 - with a 60 pixel wide start menu on the right side of the screen, shouldn't my screen size be 740x600? Is there a way to determine the "real" screen size given the location and width/height of the Start Menu?