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

31
LINES

< > BotCompany Repo | #1023390 // addTab

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

Libraryless. Click here for Pure Java version (9302L/53K).

ifclass JExtendedTabbedPane
  svoid addTab(JExtendedTabbedPane tabs, S title, Component c default jpanel()) {
    if (tabs != null) swing {
      tabs.add(title, wrap(c));
    }
  }
  
  svoid addTab(JExtendedTabbedPane tabs, S title, Swingable c) {
    if (tabs != null) swing {
      tabs.add(title, wrap(c));
    }
  }
endif

svoid addTab(JTabbedPane tabs, S title, Component c default jpanel()) {
  if (tabs != null) swing {
    tabs.add(title, wrap(c));
  }
}

svoid addTab(JTabbedPane tabs, S title, Swingable c) {
  if (tabs != null) swing {
    tabs.add(title, wrap(c));
  }
}

meta-for Component also as Swingable {
  svoid addTab(JTabbedPane tabs, WithToolTip<S> title, Component c) {
    addTabWithToolTip(tabs, title.toolTip(), title?!, c);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023390
Snippet name: addTab
Eternal ID of this version: #1023390/6
Text MD5: c2641911ddb5c532378b2cd89ecf0a3b
Transpilation MD5: 3a4cfee56bfab9b6857b90e43034501a
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-03 19:40:54
Source code size: 788 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 398 / 542
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1033912 - addTabWithToolTip