Here you can find the source of createTabbedPane(int tabPlacement)
public static JTabbedPane createTabbedPane(int tabPlacement)
//package com.java2s; //License from project: Academic Free License import java.awt.Insets; import javax.swing.JTabbedPane; import javax.swing.UIManager; public class Main { public static JTabbedPane createTabbedPane(int tabPlacement) { switch (tabPlacement) { case JTabbedPane.LEFT: case JTabbedPane.RIGHT: Object textIconGap = UIManager.get("TabbedPane.textIconGap"); Insets origInsets = UIManager.getInsets("TabbedPane.tabInsets"); Insets tabInsets = origInsets; if (tabInsets == null) { tabInsets = new Insets(2, 2, 2, 2); }/*from w w w . j av a 2s.c o m*/ UIManager.put("TabbedPane.textIconGap", new Integer(1)); UIManager.put("TabbedPane.tabInsets", new Insets(tabInsets.left, tabInsets.top, tabInsets.right, tabInsets.bottom)); JTabbedPane tabPane = new JTabbedPane(tabPlacement); UIManager.put("TabbedPane.textIconGap", textIconGap); UIManager.put("TabbedPane.tabInsets", tabInsets); return tabPane; default: return new JTabbedPane(tabPlacement); } } }