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

📄 e836. setting the tool tip for a tab in a jtabbedpane container.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
There are two ways to set a tool tip on a tab. The first is to specify it when the tab is created; the second way is to set it using JTabbedPane.setToolTipTextAt(). 
    // Create a tabbed pane
    JTabbedPane pane = new JTabbedPane();
    
    // Add a tab with a tool tip
    String label = "Tab Label";
    String tooltip = "Tool Tip Text";
    pane.addTab(label, null, component, tooltip);
    
    // Get index of new tab
    int index = pane.getTabCount()-1;
    
    // Get current tool tip
    tooltip = pane.getToolTipTextAt(index);
    
    // Change tool tip
    tooltip = "New Tool Tip Text";
    pane.setToolTipTextAt(index, tooltip);

 

⌨️ 快捷键说明

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