regarding discussion of Border vs. Box layout of OTObject JComponent Views

1 view
Skip to first unread message

Scott Cytacki

unread,
May 1, 2009, 11:50:44 AM5/1/09
to otrun...@googlegroups.com
Aaron and I were talking the other day about which swing layout was used
for the viewContainerPanel in different cases. I was pretty sure that I
had switched this to Box layout at least inside of OTCompoundDocs, but
we couldn't find it at the time.

I happened to find it today, so here it is for the archives :)

Line 77 of OTDocumentObjectView

It has a comment explaining why BorderLayout is bad. However I wouldn't
be too surprised the behavior of BorderLayout changes with different
versions of Java.

Scott

Sam Fentress

unread,
May 1, 2009, 3:52:08 PM5/1/09
to otrun...@googlegroups.com
That's good to be aware of. I find myself using BoxLayout for the majority of my layouts, but I often use BorderLayout within that when I want a component to expand as much as the view permits it. Unfortunately, while this works in standard Java layouts, because of the way the html renderer works, "as much as the view permits it" can make it expand indefinitely to the right, as we've seen.

I can look into converting some of the views, like questions, so that they contain no BorderLayout elements.

Sam
Reply all
Reply to author
Forward
0 new messages