I currently have a JFrame setup as a BorderLayout, with several buttons in the North section to represent a toolbar. What I'd like to do is have the splitPane in the Center section refresh when the user has changed Projects. When the program is launched, the center section shows a TreeView in the left side of the split pane, and a preview/detail section in the right side of the splite pane.
When the user selects a project, the center section goes blank. However, if I grab the bottom edge of the window and stretch it downwards, I can see the new treeview underneth the blank center section. It appears that I have several windows ontop of one another.
I've tried several different approaches, including a JFrame.remove on the center component, a JPanel.remove and a JSplitPane.remove to see if I can fully remove this center "window" during runtime. Anyone have any ideas?
Thanks in advance.
Oops, nevermind. Found that I can do the following:
JPanel centerPanel = (JPanel)frame.getContentPane().getComponent(1);
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL