• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Another Java question:

NTB

Diamond Member
Been working on a java program for a while today, and ran into a small problem: I realized that the window, as I originally dimensioned it, was not wide enough to fit everything that I needed. No problem...I'll just expand it a bit, right? Well, the *window* expanded, but the set of panels I was using to organize everything didn't expand with it. And it seems that no matter what I do, they won't. Playing with the min/max/preffered sizes seems to make no difference (using JBuilder 8 to write the program). Any suggestions? Any help will be appreciated 🙂

Nate
 
Originally posted by: Kilrsat
What layout manager are you using?

for the JApplet over all? Border layout - I wanted to split the window into top / middle / bottom sections. So I've got 1 panel in the north section, 1 in the center section, and 1 in the south section. Nothing for East and West.

Nate
 
Originally posted by: NTB
Originally posted by: Kilrsat
What layout manager are you using?

for the JApplet over all? Border layout - I wanted to split the window into top / middle / bottom sections. So I've got 1 panel in the north section, 1 in the center section, and 1 in the south section. Nothing for East and West.

Nate


The borderlayout will query each panel in each section for how much room it needs. The panel says how much it needs by querying its layout manager/contents. By default North/South only expand their width as the window size increases, getting their height from the height necessary to display the components in those areas.

So what layouts are you using for all your internal panels?

Basically you just have to walk down the tree to find why something isn't reporting the correct size.

Here's a basic BorderLayout example, along with a BorderLayout demo to show you how resizing is supposed to work.
http://java.sun.com/docs/books...ing/layout/border.html
 
got it figured out - thanks for the help. I'll probably be back with more questions before this project is done 🙂

Nate
 
Back
Top