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

18
LINES

< > BotCompany Repo | #1035437 // waitForFrameClose

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9239L/51K).

// assumes frame is supposed to be visible right now
svoid waitForFrameClose(JComponent c) {
  JFrame f = getFrame(c);
  if (f == null) ret;
  
  new Flag flag;
  new CloseablesHolder closer;
  
  swing {
    if (!isShowing(f))
      flag.raise();
    else
      closer.add(tempOnFrameClose(f, flag));
  }
  
  temp closer;
  flag.waitUntilUp();
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035437
Snippet name: waitForFrameClose
Eternal ID of this version: #1035437/9
Text MD5: 8e9695404f268bf9259e9e88623d614c
Transpilation MD5: 1ebd26dab5affba8493abaf4d02d4e9b
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-08 23:18:26
Source code size: 364 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 190 / 257
Version history: 8 change(s)
Referenced in: [show references]