Java JSplitPane createStrippedSplitPane(int orient, JComponent comp1, JComponent comp2)

Here you can find the source of createStrippedSplitPane(int orient, JComponent comp1, JComponent comp2)

Description

create Stripped Split Pane

License

Creative Commons License

Declaration

public static JSplitPane createStrippedSplitPane(int orient,
            JComponent comp1, JComponent comp2) 

Method Source Code

//package com.java2s;
//License from project: Creative Commons License 

import javax.swing.BorderFactory;

import javax.swing.JComponent;

import javax.swing.JSplitPane;

import javax.swing.plaf.SplitPaneUI;

import javax.swing.plaf.basic.BasicSplitPaneUI;

public class Main {
    public static JSplitPane createStrippedSplitPane(int orient,
            JComponent comp1, JComponent comp2) {
        JSplitPane split = new JSplitPane(orient, comp1, comp2);
        split.setBorder(BorderFactory.createEmptyBorder());
        SplitPaneUI splitPaneUI = split.getUI();
        if (splitPaneUI instanceof BasicSplitPaneUI) {
            BasicSplitPaneUI basicUI = (BasicSplitPaneUI) splitPaneUI;
            basicUI.getDivider().setBorder(
                    BorderFactory.createEmptyBorder());
        }/*from   w  w  w  .j a v a  2  s  . c  o m*/
        return split;
    }
}

Related

  1. addTooltipsToSplitter(final JSplitPane splitpane, final String hide, final String reveal)
  2. applyDefaultProperties(final JSplitPane comp)
  3. createSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
  4. createSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
  5. createSplitPane(int orientation, Component left, Component right)
  6. createUndecoratedSplitPane(int orientation)
  7. createVertSplitPane(Component left, Component right)
  8. flattenJSplitPane(JSplitPane splitPane)
  9. getPref(JSplitPane jSplitPane)