Creating a JTabbedPane Container
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
public class Main {
public static void main(String[] argv) throws Exception {
JPanel panel = new JPanel();
int location = JTabbedPane.TOP; // or BOTTOM, LEFT, RIGHT
JTabbedPane pane = new JTabbedPane();
String label = "Tab Label";
pane.addTab(label, panel);
}
}
Related examples in the same category