Example usage for javax.swing JTabbedPane getTabLayoutPolicy

List of usage examples for javax.swing JTabbedPane getTabLayoutPolicy

Introduction

In this page you can find the example usage for javax.swing JTabbedPane getTabLayoutPolicy.

Prototype

public int getTabLayoutPolicy() 

Source Link

Document

Returns the policy used by the tabbedpane to layout the tabs when all the tabs will not fit within a single run.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    JTabbedPane pane = new JTabbedPane();
    int rows = pane.getTabRunCount();

    int policy = pane.getTabLayoutPolicy(); // WRAP_TAB_LAYOUT

    pane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

}