1 | static void removeFromConsole3(Component c) { |
2 | JFrame frame = getFrame(c); |
3 | if (frame == null) ret; |
4 | Container cp = frame.getContentPane(); // This is our BorderLayout |
5 | Container cp2 = (Container) getCenterComponent(cp); |
6 | Container cp3 = (Container) getCenterComponent(cp2); |
7 | if (cp3 != c.getParent()) { print("removeFromConsole3 fail"); ret; } |
8 | cp3.remove(c); // free our component |
9 | Container mainC = (Container) cp3.getComponents()[0]; |
10 | cp3.remove(mainC); |
11 | |
12 | replaceCenterComponent(cp2, mainC); |
13 | validateFrame(frame); |
14 | } |
Began life as a copy of #1004956
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008116 |
Snippet name: | removeFromConsole3 - opposite of addToConsole3 |
Eternal ID of this version: | #1008116/3 |
Text MD5: | eb36034ed11a0c09dccebd3c3f8b19cd |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-04-24 23:56:38 |
Source code size: | 544 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 441 / 479 |
Version history: | 2 change(s) |
Referenced in: | [show references] |