Libraryless. Click here for Pure Java version (2937L/17K).
static Window getWindow(Object o) { if (!o instanceof Component) ret null; ret swing(() -> { Component c = cast o; while (c != null) { if (c cast Window) ret c; c = c.getParent(); } null; }); }
Began life as a copy of #1001428
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1005668 |
| Snippet name: | getWindow (get window/frame of Swing component) |
| Eternal ID of this version: | #1005668/2 |
| Text MD5: | ac298b245edb4f40cb650af3b37f68b8 |
| Transpilation MD5: | 0e85a8b9ee614fd7e5ccffca7ead9478 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-05-25 20:25:59 |
| Source code size: | 237 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1261 / 1475 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |