Libraryless. Click here for Pure Java version (2919L/17K).
static <A extends Component> A jMaxHeight_pure(int h, A c) { swing { Dimension size = c.getMaximumSize(); c.setMaximumSize(new Dimension(size.width, h)); } ret c; } static <A extends Component> A jMaxHeight_pure(A c, int h) { ret jMaxHeight_pure(h, c); }
Began life as a copy of #1031154
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031155 |
| Snippet name: | jMaxHeight_pure - set maximum height of Swing component (don't set preferred height) |
| Eternal ID of this version: | #1031155/1 |
| Text MD5: | 36667c15174392d89fa056718bb04b2c |
| Transpilation MD5: | e8c158ab0e8fba09b93c48961c8b6248 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-05-13 18:50:08 |
| Source code size: | 281 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 362 / 481 |
| Referenced in: | [show references] |