I tried to put 2 split panes into a split pane. The divider in the
continer works well. But the dividers in the sub-panes doesn't move.
Please see the attached code. Any helps will be appreciated.
Qinghuai
import javax.swing.JFrame;
import javax.swing.JSplitPane;
public class test1 extends JFrame {
public static void main(String[] args) {
JFrame f = new test1();
f.show();
}
public test1() {
setBounds(100, 200, 400, 500);
JSplitPane p1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
p1.setDividerLocation(100);
p1.setContinuousLayout(true);
JSplitPane p2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
p2.setDividerLocation(150);
p2.setContinuousLayout(true);
JSplitPane p3 = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
p1, p2);
p3.setContinuousLayout(true);
this.getContentPane().add(p3);
}
}