layout, similar to borderlayout

Hi guys.

i have search but i cant seem to find on. i would like to make a layout similar to BorderLayout.

but with instead of resizing the components it just move them around.

it is mainly for positioning componts on the screen. Alot of times i want to add a components to the BottemLeft hand side of the screen and want it aligned there permentaly.

there should be8 places to add components

12 3

45 6

78 9

and if you add componnet to the screen with the giving number, it should align the item there.

Does any one have some code like this? or know of a layoutManager that does it?

I could use 3 panels and borderLayout on each, but BorderLayout RESIZES compoments and i want something that doesnt

if not... the o well,

[796 byte] By [Nibura] at [2007-11-27 5:28:51]
# 1
HiFormLayout/GridBagLayout can do that http://www.jgoodies.com/freeware/forms/
HighVoltagea at 2007-7-12 14:51:29 > top of Java-index,Desktop,Core GUI APIs...
# 2
> but BorderLayout RESIZES compoments and i want something that doesntAdd you components to a panel, then add the panel to the BorderLayout. That way the panel resizes, but the components added to the panel don't.
camickra at 2007-7-12 14:51:29 > top of Java-index,Desktop,Core GUI APIs...
# 3
unles your nested panels use BorderLayout too...:-)
bsampieria at 2007-7-12 14:51:29 > top of Java-index,Desktop,Core GUI APIs...
# 4

thanks guys.. i think i just going to make my little hack with the nested borderlayout panels..

i will post the code once i get the thing working.. but what layout would you use to add a component to the topLeft hand corner with out resizing?

then the top right? think it is going to be a nasty little hack.

Nibura at 2007-7-12 14:51:29 > top of Java-index,Desktop,Core GUI APIs...
# 5

> unles your nested panels use BorderLayout too... :-)

By default JPanel uses a FlowLayout which will respect the preferred size of the component you add to it. So you add your compoent to a panel using a FlowLayout, then add then panel to a secon panel that is using the BorderLayout.

camickra at 2007-7-12 14:51:29 > top of Java-index,Desktop,Core GUI APIs...