I have a nested JSplitPane and the bottom split pane will only move to the left. It won't move to the right of the position even if/after I've moved it to the left.
dataEntry=new JTabbedPane();
formformat=new JPanel();
dataEntry.addTab("Table Entry", tableScroll);
dataEntry.setMnemonicAt(0, KeyEvent.VK_1);
dataEntry.addTab("Form Entry", formformat);
dataEntry.setMnemonicAt(0, KeyEvent.VK_2);
utils=new JTabbedPane();
helphtml=new JEditorPane();
utils.addTab("Field Help", helphtml);
utils.setMnemonicAt(0, KeyEvent.VK_3);
microImage=new JLabel();
utils.addTab("Image Navigation", microImage);
utils.setMnemonicAt(0, KeyEvent.VK_4);
//leftright=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
// new JPanel().add(dataEntry), new JPanel().add(utils));
leftright=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
leftright.add(dataEntry);
leftright.add(utils);
leftright.setContinuousLayout(true);
leftright.setOneTouchExpandable(true);
try {
System.out.println("divx loc"+sa.getXDivider(username));
leftright.setDividerLocation(sa.getXDivider(username));
} catch (Exception e1) {
leftright.setDividerLocation(750);
}
createImage();
if(!imgurl.equals("NONE"))
topbot=new JSplitPane(JSplitPane.VERTICAL_SPLIT,imgpnl, leftright);
else
topbot=new JSplitPane(JSplitPane.VERTICAL_SPLIT,batchImage, leftright);
topbot.setOneTouchExpandable(true);
try {
System.out.println("divy loc"+sa.getYDivider(username));
topbot.setDividerLocation(sa.getYDivider(username));
} catch (Exception e) {
topbot.setDividerLocation(600);
}
The commented out constructor doesn't work either, I've tried both and neither method changes anything.
Why does the horizontal splitpane only move in one direction? The vertical split pane has no problems and can move up and down with no problems.