List of usage examples for javax.swing JSplitPane remove
public void remove(int index)
Component
at the specified index. 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); }