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

10
LINES

< > BotCompany Repo | #1016728 // pMainAsComponent - embeddable into JFrame, JInternalFrame etc.

JavaX fragment (include)

static <A extends PApplet> A pMainAsComponent(Class<A> c) {
  final A applet = pMain(c);
  Window w = getWindow(applet);
  applet.frame = null;
  for (WindowListener l : w.getWindowListeners())
    w.removeWindowListener(l);
  getParent(applet).remove(applet);
  disposeWindow(w);
  ret applet;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016728
Snippet name: pMainAsComponent - embeddable into JFrame, JInternalFrame etc.
Eternal ID of this version: #1016728/2
Text MD5: 25cbb30b4e73cc959ff948a17f8cbf08
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-30 15:16:10
Source code size: 305 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 349 / 396
Version history: 1 change(s)
Referenced in: [show references]