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

18
LINES

< > BotCompany Repo | #1003747 // startJavaFX

JavaX fragment (include)

1  
import javafx.application.Application;
2  
import javafx.stage.Stage;
3  
4  
static bool startJavaFX_firstStart = true;
5  
6  
static void startJavaFX(final Class<? extends Application> appClass) {
7  
  thread "Starting JavaFX" {
8  
    if (startJavaFX_firstStart) {
9  
      startJavaFX_firstStart = false;
10  
      fixContextClassLoader(); // Maybe not needed anymore now
11  
      Application.launch(appClass);
12  
    } else jfxLater(r {
13  
      Application app = nuObject(appClass);
14  
      new Stage stage;
15  
      app.start(stage);
16  
    });
17  
  }
18  
}

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: 580 / 618
Referenced in: [show references]