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

9
LINES

< > BotCompany Repo | #1033921 // replaceTabTitleComponent - replace title component in JTabbedPane by name

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

Libraryless. Click here for Pure Java version (4719L/26K).

1  
sbool replaceTabTitleComponent(JTabbedPane tabs, S name, Component c) {
2  
  if (tabs == null) false;
3  
  ret swing(func -> Bool {
4  
    int idx = tabs.indexOfTab(name);
5  
    if (idx < 0) false;
6  
    tabs.setTabComponentAt(idx, c);
7  
    true;
8  
  });
9  
}

Author comment

Began life as a copy of #1010336

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033921
Snippet name: replaceTabTitleComponent - replace title component in JTabbedPane by name
Eternal ID of this version: #1033921/1
Text MD5: 1f16976f357dcd46926191c31ccd8b38
Transpilation MD5: 7654c552a141f1f4cef30f24e457d202
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-12 15:28:29
Source code size: 248 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 142 / 208
Referenced in: [show references]