I have an outer pane (NetBeans TopComponent
, let's call it "outer") and itside it I have some components and a JScrollPane
("scroll") with JPanel
inside ("inner"))
The problem is, that I want the scroll to grow to fit the space in outer when it is manually resized, but when the inner resizes in the scroll, I want the scroll not to grow and remain stable.
When I write
outerGeneralPanel.add(scrollPane,
new CC().wrap().grow());
it allows the scroll to fit my outer TopComponent, but if the panel inside the scroll gets bigger, the scroll gets bigger too, and I don't want it. Any ideas?