-
Display problem
Hi all,
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.
James D.
-
Oops, nevermind. Found that I can do the following:
JPanel centerPanel = (JPanel)frame.getContentPane().getComponent(1);
centerPanel.removeAll();
Cheers,
James D.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|