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

35
LINES

< > BotCompany Repo | #1001623 - showFrame (synonym of makeFrame)

JavaX fragment (include)

static JFrame showFrame() {
  ret makeFrame();
}

static JFrame showFrame(O content) {
  ret makeFrame(content);
}

static JFrame showFrame(S title) {
  ret makeFrame(title);
}

static JFrame showFrame(String title, O content) {
  ret makeFrame(title, content);
}

static JFrame showFrame(final JFrame f) {
  if (f != null) swing {
    if (frameTooSmall(f)) frameStandardSize(f);
    if (!f.isVisible()) f.setVisible(true); // XXX
    if (f.getState() == Frame.ICONIFIED) f.setState(Frame.NORMAL);
  }
  ret f;
}

// make or update frame
static JFrame showFrame(String title, O content, JFrame frame) {
  if (frame == null)
    ret showFrame(title, content);
  else {
    frame.setTitle(title);
    setFrameContents(frame, content);
    ret frame;
  }
}

Author comment

Began life as a copy of #1000921

download  show line numbers  debug dex   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, mqsvbyillbrs, onxytkatvevr, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1001623
Snippet name: showFrame (synonym of makeFrame)
Eternal ID of this version: #1001623/8
Text MD5: 0cdbb7427a1a0e44896111318f3f286f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-13 20:49:42
Source code size: 787 bytes / 35 lines
Pitched / IR pitched: No / No
Views / Downloads: 674 / 1333
Version history: 7 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1001623 & http://1001623.tinybrain.de