Here you can find the source of flattenJSplitPane(JSplitPane splitPane)
public static void flattenJSplitPane(JSplitPane splitPane)
//package com.java2s; /*/*from w ww . j a v a 2 s .com*/ * SK's Minecraft Launcher * Copyright (C) 2010-2014 Albert Pham <http://www.sk89q.com> and contributors * Please see LICENSE.txt for license information. */ import javax.swing.*; import javax.swing.border.Border; import javax.swing.plaf.basic.BasicSplitPaneDivider; import javax.swing.plaf.basic.BasicSplitPaneUI; public class Main { public static void flattenJSplitPane(JSplitPane splitPane) { splitPane.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); BasicSplitPaneUI flatDividerSplitPaneUI = new BasicSplitPaneUI() { @Override public BasicSplitPaneDivider createDefaultDivider() { return new BasicSplitPaneDivider(this) { @Override public void setBorder(Border b) { } }; } }; splitPane.setUI(flatDividerSplitPaneUI); splitPane.setBorder(null); } }