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

13
LINES

< > BotCompany Repo | #1011112 - getInternalFrame (get internal frame containing Swing component)

JavaX fragment (include)

1  
static JInternalFrame getInternalFrame(fO _o) {
2  
  ret _o == null ? null : swing(func -> JInternalFrame {
3  
    O o = _o;
4  
    if (o instanceof ButtonGroup) o = first(buttonsInGroup((ButtonGroup) o));
5  
    if (!(o instanceof Component)) null;
6  
    Component c = (Component) o;
7  
    while (c != null) {
8  
      if (c instanceof JInternalFrame) return (JInternalFrame) c;
9  
      c = c.getParent();
10  
    }
11  
    null;
12  
  });
13  
}

Author comment

Began life as a copy of #1001428

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011112
Snippet name: getInternalFrame (get internal frame containing Swing component)
Eternal ID of this version: #1011112/3
Text MD5: 0acc0f0075b35486702885a4b9739df7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-15 03:21:06
Source code size: 421 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 353 / 434
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1011112 & http://1011112.tinybrain.de