Hi,
I'm writing some software in Java which requires a complicated gui. As a
result I have to use exact positioning rather than a Layout manager. I am
using the standard java.awt.* (ie not JFrame just Frame) and the latest
version of the Sun J2SDK. My problem is that when I create a Frame and add
components, all co-ordinates are relative to the very top left of the
window (including the titlebar). As a result the tops of some of my
components are hidden under the titlebar. Is there any way I can find the
height of the titlebar so that I can compensate for this.
Any help would be much appreciated.
Thanks
Connell
David Postill - 22 Nov 2003 18:58 GMT
In article <bpo7tt$6ug$1@news6.svr.pol.co.uk>, on Sat, 22 Nov 2003 17:56:59 +0000, Connell Gauld
<me@DINNAYSPAM.com>
wrote:
| Hi,
|
[quoted text clipped - 8 lines]
|
| Any help would be much appreciated.
RTFM: <http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html>
Your question is answered in the description of class Frame.
<davidp />
- --
David Postill
Harald Hein - 22 Nov 2003 21:57 GMT
> I'm writing some software in Java which requires a complicated
> gui. As a result I have to use exact positioning rather than a
> Layout manager.
You are lying to yourself.
Jim Pete - 23 Nov 2003 19:50 GMT
Use GridBagLayout... it'll save you a ton of time... TRUST ME!
> Hi,
>
[quoted text clipped - 11 lines]
> Thanks
> Connell
Florian 'Irian' Schaetz - 24 Nov 2003 10:40 GMT
> Use GridBagLayout... it'll save you a ton of time... TRUST ME!
Would suggest using TableLayout instead.
Flo
Rene Ruppert - 24 Nov 2003 10:43 GMT
Hi,
> components are hidden under the titlebar. Is there any way I can find the
> height of the titlebar so that I can compensate for this.
Try "getInsets()".
cu
Rene