D
Dobieslaw Wroblewski
Hello,
I have two panels (JPanel) with etched borders, side by side. The left panel
p is growing far too wide after adding a few buttons to it. It looks bad and
I would like its width to stay as compact as possible. I tried:
p.setMaximumSize(p.getMinimumSize());
....after adding the buttons, and it looks better, but this does not solve
the problem.
The problem is that both panels are on a parent panel (BoxLayout, LINE_AXIS)
which is placed in the bottom of the application frame, divided from the
rest using a horizontal splitter. If I move the splitter up, the right
panel's height grows as expected, but the p retains its size, of course.
How to set maximum width only? Or maybe I should use different layout for
the parent panel?
DW.
I have two panels (JPanel) with etched borders, side by side. The left panel
p is growing far too wide after adding a few buttons to it. It looks bad and
I would like its width to stay as compact as possible. I tried:
p.setMaximumSize(p.getMinimumSize());
....after adding the buttons, and it looks better, but this does not solve
the problem.
The problem is that both panels are on a parent panel (BoxLayout, LINE_AXIS)
which is placed in the bottom of the application frame, divided from the
rest using a horizontal splitter. If I move the splitter up, the right
panel's height grows as expected, but the p retains its size, of course.
How to set maximum width only? Or maybe I should use different layout for
the parent panel?
DW.