Add a tab with a label, icon, and tool tip at the end of all tabs
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JTabbedPane;
public class Main {
public static void main(String[] argv) throws Exception {
JTabbedPane pane = new JTabbedPane();
JButton component = new JButton("button");
String tooltip = "Tool Tip Text";
pane.addTab("label", new ImageIcon("icon.png"), component, tooltip);
}
}
Related examples in the same category