MigLayout panel growing

时间:2015-05-04 19:54:53

标签: java swing layout-manager miglayout

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?

0 个答案:

没有答案