static BufferedImage renderComponentToImage(final Component c) { if (c == null) null; ret swing(func -> BufferedImage { int w = getWidth(c), h = getHeight(c); BufferedImage img = newBufferedImage(w, h); c.paint(createGraphics(img)); ret img; }); }
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019014 |
Snippet name: | renderComponentToImage |
Eternal ID of this version: | #1019014/2 |
Text MD5: | 24e6a5280e8c9269dbc9ae64e24d7b42 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-20 21:45:28 |
Source code size: | 277 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 391 / 422 |
Version history: | 1 change(s) |
Referenced in: | [show references] |