List of usage examples for javax.swing JSplitPane getResizeWeight
public double getResizeWeight()
From source file:Main.java
public static void main(String[] argv) throws Exception { JButton leftComponent = new JButton("left"); JButton rightComponent = new JButton("right"); JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftComponent, rightComponent); double weight = pane.getResizeWeight(); // 0.0 by default weight = 1D;/*w ww. j a v a2s . c om*/ pane.setResizeWeight(weight); weight = .5D; pane.setResizeWeight(weight); }