Libraryless. Click here for Pure Java version (5246L/29K).
1 | static <A> void addOrRemoveComponent(bool add, Container a, Component b) { |
2 | if (a == null || b == null) ret; |
3 | if (add) swing { |
4 | if (b.getParent() != a) |
5 | addAndValidate(a, b); |
6 | } else |
7 | removeAndValidate(a, b); |
8 | } |
Began life as a copy of #1005926
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034794 |
Snippet name: | addOrRemoveComponent - also validates |
Eternal ID of this version: | #1034794/4 |
Text MD5: | fdcc03263d912daefe3d1047d522b79e |
Transpilation MD5: | 3f7965e200ff554ad3effa2ad6129959 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-10 17:26:20 |
Source code size: | 231 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 164 / 253 |
Version history: | 3 change(s) |
Referenced in: | [show references] |