zoukankan      html  css  js  c++  java
  • e836. 设置JTabbedPane中卡片的提示语

    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);
    
    Related Examples
  • 相关阅读:
    多进程
    NoSQL-memcached相关
    NoSQL-redis相关
    DB相关复习
    算法
    SQLAlchemy
    Mysql相关
    Python DB-API
    正则习题
    python的正则——re模块
  • 原文地址:https://www.cnblogs.com/borter/p/9596337.html
Copyright © 2011-2022 走看看