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

22
LINES

< > BotCompany Repo | #1003549 // disposeWindow

JavaX fragment (include)

please include function myFrames.

// can probably be merged with next variant
static void disposeWindow(final Window window) {
  if (window != null) swing {
    window.dispatchEvent(new WindowEvent(window, WindowEvent.WINDOW_CLOSING)); // call listeners
    myFrames_list.remove(window);
    window.dispose();
  }
}

static void disposeWindow(final Component c) {
  disposeWindow(getWindow(c));
}

static void disposeWindow(O o) {
  if (o != null) disposeWindow(o/Component);
}

static void disposeWindow() {
  disposeWindow(heldInstance(Component));
}

Author comment

Began life as a copy of #1003377

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003549
Snippet name: disposeWindow
Eternal ID of this version: #1003549/9
Text MD5: 89e2bf45c808e4c48062260d9368cf46
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-24 00:44:53
Source code size: 574 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 662 / 801
Version history: 8 change(s)
Referenced in: #1004233 - disposeFrame
#1006654 - Standard functions list 2 (LIVE, continuation of #761)