⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e830. adding a tab to a jtabbedpane container.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
This example demonstrates various ways to add a tab to a tabbed pane. 
    // Create a tabbed pane
    JTabbedPane pane = new JTabbedPane();
    
    // Add a tab with a label taken from the name of the component
    component1.setName("Tab Label");
    pane.add(component1);
    
    // Add a tab with a label at the end of all tabs
    String label = "Tab Label";
    pane.addTab(label, component2);
    
    // Add a tab with a label and icon at the end of all tabs
    Icon icon = new ImageIcon("icon.gif");
    pane.addTab(label, icon, component3);
    
    // Add a tab with a label, icon, and tool tip at the end of all tabs
    String tooltip = "Tool Tip Text";
    pane.addTab(label, icon, component4, tooltip);
    
    // Insert a tab after the first tab
    int index = 1;
    pane.insertTab(label, icon, component5, tooltip, index);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -