Libraryless. Click here for Pure Java version (5161L/28K).
static <A extends Component> A jFixedSize(int w, int h default w, A c) { if (c != null) swing { Dimension d = new Dimension(w, h); c.setMinimumSize(d); c.setPreferredSize(d); c.setMaximumSize(d); } ret c; } static <A extends Component> A jFixedSize(A c, Dimension d) { ret jFixedSize(d.width, d.height, c); }
Began life as a copy of #1006006
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016730 |
Snippet name: | jFixedSize - set minimum size, preferred size + maximum size of Swing component |
Eternal ID of this version: | #1016730/7 |
Text MD5: | 75b751e06274082e043b86f58bdffa0d |
Transpilation MD5: | e22fa0ad8fe91739d980f6bccca4bb83 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-29 01:52:41 |
Source code size: | 345 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 414 / 521 |
Version history: | 6 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1019384 - jPreferredSizeToFixedSize #1019385 - setPreferredSize |