Libraryless. Click here for Pure Java version (2915L/17K).
static <A extends Component> A jMinWidthAtLeast(int w, final A c) { if (c == null) null; ret swing(func -> A { Dimension size = c.getMinimumSize(); Dimension d = new Dimension(max(w, size.width), size.height); c.setMinimumSize(d); ret jPreferWidth(d.width, c); }); }
Began life as a copy of #1005391
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030810 |
Snippet name: | jMinWidthAtLeast - set minimum width of Swing component |
Eternal ID of this version: | #1030810/3 |
Text MD5: | b53abe2514447a8006faa37041af338f |
Transpilation MD5: | 2dc7df2129049be0c476b2092b6f9096 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-28 19:27:34 |
Source code size: | 296 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 199 / 302 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |