I have this JPanel
(a) with BoxLayout
.
When I add another JPanel
(b) to it, with setPreferredSize()
and setBackground()
, it gets drawn nicely on (a). However, if I setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)
on (b), it doesn't get drawn at all. Or added, I cannot be sure.
If I use other layout manager (e.g. BorderLayout
), it appears again.
Anybody care to explain?