Top part is a text area defined as... JtextArea jta = new JTextArea(); f.getContentPane().add(jta); f.show();

Bottom is filled by adding a ScrollPane from a database after removing the existing one....ResultSet rs2 = stmt.executeQuery(query); MyResultSetTableModel model = new MyResultSetTableModel(rs2);JTable table = new JTable(model); if (scrollPane != null) f.getContentPane().remove(scrollPane);JScrollPane scrollPane = new JScrollPane(table); f.getContentPane().add(scrollPane); f.show(); NOTE: I can click on this table and select cells/rows,etc

Next, I try clearing out the 2 areas using ... jta.setText(""); if (scrollPane != null) f.getContentPane().remove(scrollPane); f.show(); Results..... The text area clears off, but the scrollpane is still viewable. But, I cannot click on the scrollpane with the mouse, so it must be gone from memory, but not off the screen physically.

What am I doing wrong that I can still see the pane, but it is not there?? Bob

Welcome to the Ranch Bob. You do not need to call show several times. But after the first time you do, call Container.validate when adding or removing a component. But because getContentPane returns a JPanel, use revalidate. Maybe repaint is also needed. [ February 26, 2004: Message edited by: Jose Botella ]