Libraryless. Click here for Pure Java version (9236L/53K).
1 | svoid addOrReplaceTab(JTabbedPane tabs, S tabName, Swingable c) { |
2 | addOrReplaceTab(tabs, tabName, wrap(c)); |
3 | } |
4 | |
5 | svoid addOrReplaceTab(JTabbedPane tabs, S tabName, Component c) swing { |
6 | if (tabs == null) ret; |
7 | int idx = indexOfTabName(tabs, tabName); |
8 | if (idx >= 0) |
9 | setTab(tabs, idx, c); |
10 | else |
11 | addTabs(tabs, tabName, c); |
12 | } |
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: | 131 / 206 |
Version history: | 4 change(s) |
Referenced in: | [show references] |