Swing, SpringLayout, and JPanel hiding trick
Hi All,
I got a problem with my application for refreshing the UI. I use JPanel and SpringLayout to layout my UI, because of the nested layout I got confused how to re-update the UI after I hide some of the panel that I have on screen.
Basically I have 7 panels displayed on the screen (A to G)
A (JFrame)
|
|- B (JScrollPane)
|
|-C (JPanel, [i]using SpringLayout[/i])
|
|- D (JPanel [i]with action listener to hide/show E[/i])
|
|- E (JPanel)
|-- F (JPanel, [i]with action listener to hide G[/i])
|-- G (JPanel
When I try to hide/show panel E by clicking on D, my codes can refresh panel C, but somehow when I try to click on panel F to display/show panel G, my codes can't refresh panel C. this problem affects the size of the scrollpane that I have in panel B.
Well.. it's kinda confusing specially I tried to revalidate and repaint all the components C above and none of them works. any help are appreciated.

