Libraryless. Click here for Pure Java version (9236L/53K).
svoid addOrReplaceTab(JTabbedPane tabs, S tabName, Swingable c) { addOrReplaceTab(tabs, tabName, wrap(c)); } svoid addOrReplaceTab(JTabbedPane tabs, S tabName, Component c) swing { if (tabs == null) ret; int idx = indexOfTabName(tabs, tabName); if (idx >= 0) setTab(tabs, idx, c); else addTabs(tabs, tabName, c); }
Began life as a copy of #1034481
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035108 |
Snippet name: | addOrReplaceTab |
Eternal ID of this version: | #1035108/5 |
Text MD5: | 460458f1a97b728f035c0e5c09a56b38 |
Transpilation MD5: | ac4e51b8ff683a132ba000eb8f21e02f |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-31 19:05:17 |
Source code size: | 344 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 132 / 207 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1036247 - removeTab |