Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1020193 // rectangleFromScreenToComponent

JavaX fragment (include)

1  
static Rectangle rectangleFromScreenToComponent(Rectangle r, Component c) {
2  
  if (r == null) null;
3  
  Point p = new(r.x, r.y);
4  
  SwingUtilities.convertPointFromScreen(p, c);
5  
  ret new Rectangle(p.x, p.y, r.width, r.height);
6  
}

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: 309 / 327
Referenced in: [show references]