create Tab - Java Swing

Java examples for Swing:JTabbedPane

Description

create Tab

Demo Code


//package com.java2s;

import javax.swing.JComponent;

import javax.swing.JTabbedPane;

public class Main {
    public static final JTabbedPane createTab(final JComponent... tabs) {
        final JTabbedPane tabPane = new JTabbedPane();
        for (final JComponent tab : tabs) {
            tabPane.add(tab);/*from   w ww  . ja v a  2 s  .c om*/
        }
        return tabPane;
    }
}

Related Tutorials