I m, using A BorderLayout. In the north position, I have a panel called panNorthwhere I add some component (for example, with one click I add one button in the next line (gridlayout)). In the main frame in the central part, I will add something later.
So, what is the problem, when I add new controls to panNorth, the size increases and takes center stage BorderLayout's. So I added JScrollPaneon the north side and added panNorthto Jscrollpane, but nothing else happened. The same thing happens again; the size JScrollPaneexpands to its original size panNorth, so it displays all the components, now the scroll bar is not fully used.
Therefore, please suggest me to make visible only 3 lines at a time.
source
share