In a few different programs I've made, I've seen a need (or great want) to create a scrollable list contained in a JPanel. However, experimenting with different layout managers, JScrollPane settings, JPanel settings, etc has yielding undesired results.

One such iteration was having a "list" panel with a FlowLayout, and putting it into a JScrollPane. Each item in the list being its own JPanel the width of the window. This works great for the first item in the list, but any additional items flow off to the right; the scroll pane seems to overpower the flow layout.

More examples and code can be provided for specific attempts. Thanks.