Libraryless. Click here for Pure Java version (5225L/29K).
1 | svoid removeAndValidate(Component c) {
|
2 | if (c != null) swing {
|
3 | Container cc = c.getParent(); |
4 | if (cc != null) {
|
5 | cc.remove(c); |
6 | cc.revalidate(); |
7 | cc.repaint(); // bugs without this |
8 | } |
9 | } |
10 | } |
11 | |
12 | svoid removeAndValidate(Container container, Component c) {
|
13 | if (c != null) swing {
|
14 | if (c.getParent() == container) removeAndValidate(c); |
15 | } |
16 | } |
Began life as a copy of #1010642
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1019877 |
| Snippet name: | removeAndValidate - remove form parent and validate parent |
| Eternal ID of this version: | #1019877/4 |
| Text MD5: | 6f82ffc5791e131f3970a1234dc16d9c |
| Transpilation MD5: | ce50d408fafc5c997ebf14f355835f98 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-10 17:25:23 |
| Source code size: | 380 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 546 / 693 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |