Libraryless. Click here for Pure Java version (2919L/17K).
1 | static <A extends Component> A jMaxHeight_pure(int h, A c) { |
2 | swing { |
3 | Dimension size = c.getMaximumSize(); |
4 | c.setMaximumSize(new Dimension(size.width, h)); |
5 | } |
6 | ret c; |
7 | } |
8 | |
9 | static <A extends Component> A jMaxHeight_pure(A c, int h) { |
10 | ret jMaxHeight_pure(h, c); |
11 | } |
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: | 150 / 219 |
Referenced in: | [show references] |