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

8
LINES

< > BotCompany Repo | #1005391 // jMinWidth - set minimum width of Swing component

JavaX fragment (include)

static <A extends Component> A jMinWidth(final int w, final A c) {
  if (c == null) null;
  ret swing(func -> A {
    Dimension size = c.getMinimumSize();
    c.setMinimumSize(new Dimension(/*max(w, size.width) ??? */w, size.height));
    ret jPreferWidth(w, c);
  });
}

Author comment

Began life as a copy of #1004934

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: #1005391
Snippet name: jMinWidth - set minimum width of Swing component
Eternal ID of this version: #1005391/4
Text MD5: 417c20084fff5709662278846a441bbb
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-06 13:46:57
Source code size: 277 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 447 / 440
Version history: 3 change(s)
Referenced in: [show references]