1 | static void removeFromConsole2(Component c) { |
2 | JFrame frame = getFrame(c); |
3 | if (frame == null) ret; |
4 | Container cp = frame.getContentPane(); // This is our BorderLayout |
5 | cp = (Container) getCenterComponent(cp); |
6 | if (cp != c.getParent()) { print("removeFromWindow fail"); ret; } |
7 | cp.remove(c); |
8 | Container mainC = (Container) cp.getComponents()[0]; |
9 | cp.remove(mainC); |
10 | |
11 | replaceCenterComponent(frame.getContentPane(), mainC); |
12 | validateFrame(frame); |
13 | } |
Began life as a copy of #1004937
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004956 |
Snippet name: | removeFromConsole2 - opposite of addToConsole2 |
Eternal ID of this version: | #1004956/1 |
Text MD5: | 9f21229ecc51b8dd939d13d4cd77ad2b |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-09-18 17:46:30 |
Source code size: | 468 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 637 / 598 |
Referenced in: | [show references] |