Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1006252 // frameInnerHeight - set content pane height of a frame

JavaX fragment (include)

static void frameInnerHeight(final JFrame frame, final int h) {
  swingAndWait(r {
    Container cp = frame.getContentPane();
    Dimension oldSize = cp.getPreferredSize();
    cp.setPreferredSize(new Dimension(cp.getWidth(), h));
    frame.pack();
    cp.setPreferredSize(oldSize);
  });
}

Author comment

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: 511 / 525
Referenced in: [show references]