Setting the Size of the Divider in a JSplitPane Container
import javax.swing.JButton;
import javax.swing.JSplitPane;
public class Main {
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);
int size = pane.getDividerSize();
size = 1;
pane.setDividerSize(size);
}
}
Related examples in the same category