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

17
LINES

< > BotCompany Repo | #1004934 // jMinHeight

JavaX fragment (include)

static Component jMinHeight(Swingable c, int h) {
  ret jMinHeight(wrap(c), h);
}

static Component jMinHeight(int h, Swingable c) {
  ret jMinHeight(wrap(c), h);
}

static <A extends Component> A jMinHeight(A c, int h) {
  ret jMinHeight(h, c);
}

static <A extends Component> A jMinHeight(int h, A c) {
  Dimension size = c.getMinimumSize();
  c.setMinimumSize(new Dimension(size.width, max(h, size.height)));
  ret jPreferHeight(h, c);
}

Author comment

Began life as a copy of #1004496

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004934
Snippet name: jMinHeight
Eternal ID of this version: #1004934/6
Text MD5: 620d18f198143fe224892943ca39c3aa
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-12-16 07:29:10
Source code size: 456 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 514 / 551
Version history: 5 change(s)
Referenced in: [show references]