static Rectangle rectangleFromScreenToComponent(Rectangle r, Component c) { if (r == null) null; Point p = new(r.x, r.y); SwingUtilities.convertPointFromScreen(p, c); ret new Rectangle(p.x, p.y, r.width, r.height); }
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1020193 |
| Snippet name: | rectangleFromScreenToComponent |
| Eternal ID of this version: | #1020193/1 |
| Text MD5: | cfa20c03a74bc06cefa9a1ac2696e4bb |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-12-10 01:25:38 |
| Source code size: | 233 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 542 / 575 |
| Referenced in: | [show references] |