I am using 6.1.1 and discovered that the setDividerLocation(int) doesn't
seem to be working properly. In the example below, the calls to set the
location don't seem to have any effect. Below this example, I have included
the identical Swing app, which shows how it is supposed to work.
I would appreciate you confirming this and offering and advice as to a
resolution or workaround.
Thanks.
-Stuart Booth (Abacus Research)
public class BugsFrameApp extends AbstractApplication {
public void start() {
new BugsFrame().setVisible(true);
}
public static void main(String[] args) {
DevelopmentRunner.setApplicationClass(BugsFrameApp.class);
DevelopmentRunner.run();
}
class BugsFrame extends ULCFrame {
public BugsFrame() {
super("Bugs");
setDefaultCloseOperation(ULCFrame.TERMINATE_ON_CLOSE);
setSize(800,900);
addComponents();
}
private void addComponents() {
ULCComponent tree1 = new ULCScrollPane(new ULCTree()) ;
ULCComponent tree2 = new ULCScrollPane(new ULCTree());
ULCComponent tree3 = new ULCScrollPane(new ULCTree());
ULCSplitPane topSplit = new
ULCSplitPane(ULCSplitPane.VERTICAL_SPLIT, tree1, tree2);
ULCSplitPane bottomSplit = new
ULCSplitPane(ULCSplitPane.VERTICAL_SPLIT, topSplit, tree3);
add(bottomSplit, ULCBorderLayoutPane.CENTER);
bottomSplit.setDividerLocation(600);
topSplit.setDividerLocation(300);
}
}
}
This is the Swing app that works fully:
public class BugsFrameApp extends JFrame {
public static void main(String[] args) {
new BugsFrameApp().setVisible(true);
}
public BugsFrameApp() {
super("Bugs");
setDefaultCloseOperation(ULCFrame.TERMINATE_ON_CLOSE);
setSize(800, 900);
addComponents();
}
private void addComponents() {
JComponent tree1 = new JScrollPane(new JTree());
JComponent tree2 = new JScrollPane(new JTree());
JComponent tree3 = new JScrollPane(new JTree());
JSplitPane topSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
tree1, tree2);
JSplitPane bottomSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
topSplit, tree3);
add(bottomSplit, ULCBorderLayoutPane.CENTER);
bottomSplit.setDividerLocation(600);
topSplit.setDividerLocation(300);
}
}
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer