Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

Titlebars of Frames

Thread view: 
Connell Gauld - 22 Nov 2003 17:56 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.