AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Titlebars of Frames

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Connell Gauld
Guest





PostPosted: Sat Nov 22, 2003 5:56 pm    Post subject: Titlebars of Frames Reply with quote



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
Back to top
David Postill
Guest





PostPosted: Sat Nov 22, 2003 6:58 pm    Post subject: Re: Titlebars of Frames Reply with quote



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In article <bpo7tt$6ug$1 (AT) news6 (DOT) svr.pol.co.uk>, on Sat, 22 Nov 2003 17:56:59 +0000, Connell Gauld
<me (AT) DINNAYSPAM (DOT) com>
wrote:

Quote:
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.

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

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3 - not licensed for commercial use: www.pgp.com
Comment: Get key from pgpkeys.mit.edu:11370

iQA/AwUBP7+rP3xp7q1nhFwUEQI+8wCg1D0QOFgZ6JKu+Pdpk888a/vigZgAoKsj
pJnK6YTYyKz7Y+Doz/gn4dQL
=q2X3
-----END PGP SIGNATURE-----


Back to top
Harald Hein
Guest





PostPosted: Sat Nov 22, 2003 9:57 pm    Post subject: Re: Titlebars of Frames Reply with quote



"Connell Gauld" wrote:

Quote:
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.

Back to top
Jim Pete
Guest





PostPosted: Sun Nov 23, 2003 7:50 pm    Post subject: Re: Titlebars of Frames Reply with quote

Use GridBagLayout... it'll save you a ton of time... TRUST ME!



"Connell Gauld" <me (AT) DINNAYSPAM (DOT) com> wrote

Quote:
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



Back to top
Florian 'Irian' Schaetz
Guest





PostPosted: Mon Nov 24, 2003 10:40 am    Post subject: Re: Titlebars of Frames Reply with quote

"Jim Pete" <jimmypete2k3 (AT) hotmail (DOT) com> wrote

Quote:
Use GridBagLayout... it'll save you a ton of time... TRUST ME!

Would suggest using TableLayout instead.

Flo

Back to top
Rene Ruppert
Guest





PostPosted: Mon Nov 24, 2003 10:43 am    Post subject: Re: Titlebars of Frames Reply with quote

Hi,

Quote:
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



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.