Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1033912 // addTabWithToolTip

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (6546L/36K).

1  
svoid addTabWithToolTip(JTabbedPane tabs, S title, S toolTip, Component c) {
2  
  if (tabs == null) ret;
3  
  swing {
4  
    addTab(tabs, title, c);
5  
    if (nempty(toolTip))
6  
      tabs.setToolTipTextAt(tabCount(tabs)-1, toolTip);
7  
  }
8  
}
9  
10  
svoid addTabWithToolTip(JTabbedPane tabs, S title, S toolTip, Swingable c) {
11  
  addTabWithToolTip(tabs, title, toolTip, wrap(c));
12  
}

Author comment

Began life as a copy of #1023390

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033912
Snippet name: addTabWithToolTip
Eternal ID of this version: #1033912/2
Text MD5: 52e720cc5ff9742598826d32d5a2570d
Transpilation MD5: 780e36109dfe5990c86ffc75176485ad
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-10 18:25:39
Source code size: 369 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 136 / 195
Version history: 1 change(s)
Referenced in: [show references]