wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Split Pane & JTable - program hangs. Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Split Pane & JTable - program hangs. Help!" Watch "Split Pane & JTable - program hangs. Help!" New topic
Author

Split Pane & JTable - program hangs. Help!

Graham Russell
Greenhorn

Joined: Jul 15, 2004
Posts: 6
I have a split pane with the top half used for ComboBoxes and search criteria and the bottom half devoted to displaying the results of the search criteria in a JTable.

This is how I bind my panels:

doublePane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, comboPanel, jsp);
doublePane.setOneTouchExpandable(true);
doublePane.setDividerLocation(200);

(jsp is the JScrollPane in which I have my JTable).

And this is how I try to display them:

getContentPane().add(doublePane);

setVisible(true);

And yet when I run it the program just hangs. Any Ideas?
sasi kala
Ranch Hand

Joined: Dec 17, 2004
Posts: 68
Hi,

Try this code....


doublePane = new JSplitPane();
doublePane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
doublePane.setOneTouchExpandable(true);
doublePane.setDividerLocation(200);


doublePane.setTopComponent(comboPanel);
doublePane.setBottomComponent(jsp);

getContentPane().add(doublePane);

setVisible(true);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Split Pane & JTable - program hangs. Help!
 
Similar Threads
JTable
JTable "..."
jtable
JTable Paging
Jtable, Jtextarea