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

34
LINES

< > BotCompany Repo | #1019307 // JavaFX Test [Dyn Module, WORKS, but compilation fails on new JDK]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (10032L/71K).

1  
!7
2  
3  
import javafx.application.Platform;
4  
import javafx.embed.swing.JFXPanel;
5  
import javafx.scene.Group;
6  
import javafx.scene.Scene;
7  
import javafx.scene.paint.Color;
8  
import javafx.scene.text.Font;
9  
import javafx.scene.text.Text;
10  
11  
module JavaFXTest > DynModule {
12  
  visualize {
13  
    final new JFXPanel fxPanel;
14  
    jfxLater(r {
15  
      fxPanel.setScene(createScene());
16  
    });
17  
    ret fxPanel;
18  
  }
19  
}
20  
21  
// JavaFX World
22  
static Scene createScene() {
23  
  new Group root;
24  
  Scene scene = new Scene(root, Color.ALICEBLUE);
25  
  new Text text;
26  
  
27  
  text.setX(40);
28  
  text.setY(100);
29  
  text.setFont(new Font(25));
30  
  text.setText("Welcome JavaFX!");
31  
32  
  root.getChildren().add(text);
33  
  ret scene;
34  
}

Author comment

Began life as a copy of #1003701

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019307
Snippet name: JavaFX Test [Dyn Module, WORKS, but compilation fails on new JDK]
Eternal ID of this version: #1019307/3
Text MD5: c5ee41a60b9a61fda7c1dbf90a5e41ff
Transpilation MD5: 0e379539277c7ea58790d2ba95a2803a
Author: stefan
Category: javax / javafx
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-19 13:26:39
Source code size: 707 bytes / 34 lines
Pitched / IR pitched: No / No
Views / Downloads: 423 / 3775
Version history: 2 change(s)
Referenced in: [show references]