I have a JScrollPane with FlowLayout that I want to have a fixed width. It should be scrolling vertically only, and the contents should be rearranged automatically when I resize the window. I think there should be a method like setEnableHorizontalScroll(false) but can’t find it.
Is there any easy way to do this?
Finally I found out how, please see this very short example, no advanced tricks needed:
Adapted from Sun’s tutorial