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

18
LINES

< > BotCompany Repo | #1003747 // startJavaFX

JavaX fragment (include)

import javafx.application.Application;
import javafx.stage.Stage;

static bool startJavaFX_firstStart = true;

static void startJavaFX(final Class<? extends Application> appClass) {
  thread "Starting JavaFX" {
    if (startJavaFX_firstStart) {
      startJavaFX_firstStart = false;
      fixContextClassLoader(); // Maybe not needed anymore now
      Application.launch(appClass);
    } else jfxLater(r {
      Application app = nuObject(appClass);
      new Stage stage;
      app.start(stage);
    });
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003747
Snippet name: startJavaFX
Eternal ID of this version: #1003747/1
Text MD5: c4e8e3a75aba534485d02bcf890fff63
Author: stefan
Category: javax / javafx
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-26 19:25:21
Source code size: 527 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 578 / 616
Referenced in: [show references]