Example usage for javax.swing JSplitPane getInsets

List of usage examples for javax.swing JSplitPane getInsets

Introduction

In this page you can find the example usage for javax.swing JSplitPane getInsets.

Prototype

@BeanProperty(expert = true)
public Insets getInsets() 

Source Link

Document

If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets.

Usage

From source file:org.ngrinder.recorder.Recorder.java

/**
 * Create a split pane with the give left and right components.
 * //ww w . ja  v  a2  s . c om
 * @param left
 *            component located in left
 * @param right
 *            component located in right
 * @return JSplitPane instance
 */
protected JSplitPane createSplitPane(final JComponent left, final JComponent right) {
    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, left, right);
    splitPane.setDividerLocation(
            splitPane.getSize().width - splitPane.getInsets().right - splitPane.getDividerSize() - 200);
    splitPane.setResizeWeight(1);
    splitPane.setMinimumSize(new Dimension(600, 600));
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerSize(10);
    return splitPane;
}