>>>>> John Summerfield writes:
John> On Thu, 29 Oct 1998, John Summerfield wrote:
>>
>> I have seen insets mentioned in the JDK documentation, but only in the
>> context of a ScrollPane.
>>
>> Seems I've some code to change. Sob.
>>
John> I'll assume that Insets fixes the problem - it was, in any
John> event, secondary to something else that was bugging me;
John> MouseEvent.isPopuptrigger() always returns false on OS/2 &
John> NT - that's why my sample code was doing mousey things.
The popup trigger thing is very bad design. Sun should have done
something like PopupListener/Event.
On X the popup trigger is 'right button *press*' but on windows it is
'right button *release*'. So you have to check isPopupTrigger both
in mousePressed and mouseReleased.
John> One thing about this Insets caper bugs me though: I have a
John> Frame: its background is white. I position a window
John> (MenuBar, grey) at the top using the value returned by
John> Insets. On OS/2 it looks fine: on Linux there's a 1-2 pixel
John> white line above the MenuBar.
Insets differ between various platforms and window managers. Our
port should be slightly better in detecting insets than the Sun
Solaris JDK. What version of the Linux JDK and what window manager
do you use?
John> I'll hide the problem for now by changing my colours.
John> btw I have noticed the Insets returned by OS/2 are
John> different. I've also noticed that Insets returns all zeroes
John> if the window's not visible - another spastic idea. Perhaps
John> I'll bug Sun with that one though.
When the window never was mapped (i.e. the peer doesn't exist) java
has no chance to determine the insets because they depend on the window
manager.
Juergen