You were correct in saying that BorderLayout honors the
preferred height for north and south positioned components.
Preferred size is determined by Component.getPreferredSize(). I believe by default an AWT component gets this information from its peer but of course you can override it and thereby set any dimension you want. With Swing components, you can change the preferred size by simply using JComponent.setPreferredSize().
Here's a snippet of the source code to BorderLayout's layoutContainer method:
So you can see that it really does use the preferred size for north and south positions. Also, here's some code that demonstrates setting the size of a northern positioned AWT button:
(My first time answering someone's question on here! Let's hope I'm right...
)
- Dave
[This message has been edited by Dave Terrian (edited April 21, 2001).]