I have a panel with a JPanel panel with a stream layout, the panel containing is located in JScrollPane, the panel containing contains a bunch of other JPanels, internal panels in it. All interior panels are the same size. If there are more panels, then the panel containing the panel can hold it in width , then they are attached to the grid down, and if there are more panels, the panel> can be held in height , then the inner panels are aligned in the same grid, except for the last row, which is centered with the previous row.
While I change the size of the dialog, the panel containing the panel expands , and the layout layout layout does its job, but the scrollbars are not displayed, although the size of the panel exceeds the bounds of JScrollPane.
How to control the appearance of scroll bars when dynamically resizing a panel ?
as for images, they should summarize:

After expanding the width of the dialog box:

Adam
source
share