1 | static void frameInnerHeight(final JFrame frame, final int h) { |
2 | swingAndWait(r { |
3 | Container cp = frame.getContentPane(); |
4 | Dimension oldSize = cp.getPreferredSize(); |
5 | cp.setPreferredSize(new Dimension(cp.getWidth(), h)); |
6 | frame.pack(); |
7 | cp.setPreferredSize(oldSize); |
8 | }); |
9 | } |
Began life as a copy of #1006237
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006252 |
Snippet name: | frameInnerHeight - set content pane height of a frame |
Eternal ID of this version: | #1006252/1 |
Text MD5: | 4c45f15f2f2736758f8156988c6da317 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-25 22:55:49 |
Source code size: | 298 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 513 / 527 |
Referenced in: | [show references] |