Example usage for javax.swing JSplitPane remove

List of usage examples for javax.swing JSplitPane remove

Introduction

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

Prototype

public void remove(int index) 

Source Link

Document

Removes the Component at the specified index.

Usage

From source file:org.openmicroscopy.shoola.agents.imviewer.view.ImViewerUI.java

/**
 * Adds a left and right component to the specified pane.
 * //from ww  w .  ja va 2  s.  c  om
 * @param pane   The split pane to add the components to.
 * @param left   The left component to add.
 * @param right The right component to add.
 */
private void addComponents(JSplitPane pane, JComponent left, JComponent right) {
    Component c = pane.getLeftComponent();
    if (c != null)
        pane.remove(c);
    c = pane.getRightComponent();
    if (c != null)
        pane.remove(c);
    pane.setLeftComponent(left);
    pane.setRightComponent(right);
}