controls.add(new JTextField(10));
controls.add(new JButton("Refresh"));
controls.setBorder(new TitledBorder("Filters"));
cp.add("Center", controls);
JXFrame frame = new JXFrame();
frame.setLayout(new BorderLayout());
// Put the "Controls" first
frame.add("North", cp);
// Then the tree - we assume the Controls would somehow filter the tree
JScrollPane scroll = new JScrollPane(new JTree());
frame.add("Center", scroll);
// Show/hide the "Controls"
JButton toggle = new JButton(cp.getActionMap().get(JXCollapsiblePane.TOGGLE_ACTION));
toggle.setText("Show/Hide Search Panel");
frame.add("South", toggle);
frame.pack();
frame.setVisible(true);
}