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

12
LINES

< > BotCompany Repo | #1028105 // enclosingTab

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

Libraryless. Click here for Pure Java version (2654L/17K).

static Pair<JTabbedPane, Int> enclosingTab(Component _c) {
  ret swing(() -> {
    Component c = _c;
    while (c != null) {
      Container p = c.getParent();
      if (p cast JTabbedPane)
        ret pair(p, p.indexOfComponent(c));
      c = c.getParent();
    }
    null;
  });
}

Author comment

Began life as a copy of #1007191

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1028105
Snippet name: enclosingTab
Eternal ID of this version: #1028105/1
Text MD5: 8501053ff6c9ca28aa3e84fa7a8c0fa1
Transpilation MD5: 89f69cbe8df81505a832d12ada5ea0d0
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-19 15:00:43
Source code size: 293 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 142 / 228
Referenced in: [show references]