I have a JPanel with a vertical BoxLayout on top of a JPanel with a null layout.
I would like the JPanel with the BoxLayout to grow as the components are being added
Suggestions:
JPanel
a BorderLayout
?BoxLayout
using JPanel
to the BorderLayout.NORTH
(or also known as BorderLayout.PAGE_START
) position.Edit
You state,
IN ADVANCE: I need the position of "box" to be at exactly 100,200 so please do not suggest that I do not use null layout. I must use null layout. The null layout of "total" should not effect the answer to my question, which focuses on the "box" panel.
I think that you are once again putting needless restrictions on your program. You can place your "box" at 100, 200 easily by putting an empty border of that size around it, or by other means. But the answer is not to throw out use of the null layout.