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

21
LINES

< > BotCompany Repo | #1009936 - setBounds - set bounds of component

JavaX fragment (include)

static <A extends Component> A setBounds(final int x, final int y, final int w, final int h, final A a) {
  if (a != null) swing {
    a.setBounds(x, y, w, h);
  }
  ret a;
}

static <A extends Component> A setBounds(A a, Rect r) {
  if (a != null && r != null) swing {
    a.setBounds(toRectangle(r));
  }
  ret a;
}

static <A extends Component> A setBounds(Rect r, A a) {
  ret setBounds(a, r);
}

static <A extends Component> A setBounds(A a, int x, int y, int w, int h) {
  ret setBounds(x, y, w, h, a);
}

download  show line numbers  debug dex   

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

No comments. add comment

Snippet ID: #1009936
Snippet name: setBounds - set bounds of component
Eternal ID of this version: #1009936/7
Text MD5: f31645475b55ff8a35872c7539012688
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-08 21:42:40
Source code size: 530 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 344 / 343
Version history: 6 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1009936 & http://1009936.tinybrain.de