There seems to be a couple of threads already out there on this topic, but I haven't found a resolution that works for me. I currently have a JFrame that has a BorderLayout Layout Manager. In the center area, I add a JSplitPane called mainArea. Finally, I add a navigationPane in the left area of the mainArea.
I have a view -> navigation menu item that should toggle whether the navigationPane is visible. Initially, the navigation menu is not visible. When I select the navigation menu item the first time, the navigation panel becomes visible. When I select the navigation menu item a second time, the navigation panel becomes invisible. Everything works great up to this point. When I select the navigation menu a third time, nothing happens. The navigation panel should be visible, but nothing happens until I physically drag the split pane divider. I have tried invalidating and then repainting, but it doesn't work. Any suggestions?
Joined: Sep 29, 2000
Instead of using the setVisible command, I tried removing and adding the component to the container and that seems to work. Nevertheless, I am sure that I will come across this issue again some day. Any help would be greatly appreciated. Any thoughts? Thanks.