DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Display problem

  1. #1
    Join Date
    Feb 2004

    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.

  2. #2
    Join Date
    Feb 2004
    Oops, nevermind. Found that I can do the following:

    JPanel centerPanel = (JPanel)frame.getContentPane().getComponent(1);


    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
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.