• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Split Pane & JTable - program hangs. Help!

 
Graham Russell
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic