Libraryless. Click here for Pure Java version (2939L/17K).
// paint: graphics/component width/component height // called in AWT thread static JComponent dynamicallyPaintedComponent(final VF3<Graphics2D, Int, Int> paint) { ret swing(func -> JComponent { ret new JComponent { public void paint(Graphics g) { callF(paint, (Graphics2D) g, getWidth(), getHeight()); } }; }); } static JComponent dynamicallyPaintedComponent(IVF3<Graphics2D, Int, Int> paint) { ret dynamicallyPaintedComponent(toVF3(paint)); }
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: | #1019509 |
Snippet name: | dynamicallyPaintedComponent |
Eternal ID of this version: | #1019509/7 |
Text MD5: | a916e8ee253f6b6b05d106fa44f63eb3 |
Transpilation MD5: | 16b939e365b83dd504cfd0a892136428 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-07 15:08:32 |
Source code size: | 494 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 328 / 410 |
Version history: | 6 change(s) |
Referenced in: | [show references] |