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

6
LINES

< > BotCompany Repo | #1008597 // componentsBoundingSize

JavaX fragment (include)

static Dimension componentsBoundingSize(Container container, int insetBottomRight) {
  Rectangle r = new Rectangle(0, 0, 0, 0);
  for (Component c : container.getComponents())
    r = rectangleUnion(r, c.getBounds());
  ret new Dimension(r.x+r.width+insetBottomRight, r.y+r.height+insetBottomRight);
}

Author comment

Began life as a copy of #1008594

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008597
Snippet name: componentsBoundingSize
Eternal ID of this version: #1008597/1
Text MD5: 885012fb5fb478456099d02483d03f60
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-25 13:37:07
Source code size: 306 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 536 / 573
Referenced in: [show references]