I'm having trouble getting FlowLayout to flow as it claims it does. Any help is greatly appreciated:
JPanel panel = new JPanel(); // default flow layout
JScrollPane scroll = new JScrollPane(panel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
My problem is that regardless of the number of items added to the panel, it never flows onto a second line. Instead, the panel is resized horizontally beyond the viewport size and the additional items are not visible.
Again, any suggestions are greatly appreciated!
Thanks,
Brian.