Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Easy layout question

Reply
Thread Tools

Easy layout question

 
 
Si
Guest
Posts: n/a
 
      04-07-2004
How do I have the main Container in my Frame, so that it contains two "rows"
of panels - the only difference between the two being that the top on is
about 10% of the height (or, say, 50 pixels)?

I currently have a GridLayout(2,1), but it displays both "rows" them with
equal heights...


 
Reply With Quote
 
 
 
 
Bjorn Abelli
Guest
Posts: n/a
 
      04-07-2004

"Si" wrote...

> How do I have the main Container in my Frame, so that
> it contains two "rows" of panels - the only difference
> between the two being that the top on is
> about 10% of the height (or, say, 50 pixels)?


There are a lot of possibilities. Beside the use of the ordinary
LayoutManagers, you can even define your own.

However, 10 % or 50 pixels are two different paradigms in the underlying
assumptions on how the LayoutManagers work.

The use of exact pixel sizes was more or less abandoned for the use of
relative sizes. This is to some degree based on the premise that you would
probably prefer the look of the layout to adapt more to the actual
platform...

To make a long story short:

One suggestion could be to use a BorderLayout. Put the upper panel into the
NORTH place, and the lower one in the CENTER.

// Bjorn A






 
Reply With Quote
 
 
 
 
Karsten Lentzsch
Guest
Posts: n/a
 
      04-08-2004
Si wrote:

> How do I have the main Container in my Frame, so that it contains two "rows"
> of panels - the only difference between the two being that the top on is
> about 10% of the height (or, say, 50 pixels)?


You may consider using the FormLayout and the Forms layout system.
See http://www.jgoodies.com/freeware/forms/

Karsten
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Choosing Layout: Css-Layout or Table-Layout hpourfard@gmail.com ASP .Net 1 06-19-2006 10:06 AM
easy form layout question mouac01@yahoo.com HTML 1 02-10-2006 11:11 PM
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM
Easy Layout Question AJ Java 23 12-31-2003 05:56 PM
DataList inside a Grid Layout Panel (<DIV>) item layout problem Rick Spiewak ASP .Net 3 08-26-2003 04:22 AM



Advertisments