I've recently tried to use the box layout and I couldn't get it to work quite properly.
When attempting to implement the box layout, I couldn't understand this bit of code. What exactly is the container, my window, a JPanel. And then what is int. Those were the first two things I ran in to.
Here is the basic code of fake program, but the way I have the code organized is the same way I would in a real program.