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

34
LINES

< > BotCompany Repo | #1003701 // JavaFX in Swing JFrame!

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (4983L/35K/129K).

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  
p-awt {
12  
  JFrame frame = showFrame();
13  
  final new JFXPanel fxPanel;
14  
  frame.add(fxPanel);
15  
16  
  jfxLater(r {
17  
    fxPanel.setScene(createScene());
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  
}

download  show line numbers  debug dex  old transpilations   

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

Comments [hide]

ID Author/Program Comment Date
1257 stefan Works!! 2016-07-25 23:59:57

add comment

Snippet ID: #1003701
Snippet name: JavaFX in Swing JFrame!
Eternal ID of this version: #1003701/2
Text MD5: 79b55002ad91ef4978c12d69e24ec3f8
Transpilation MD5: 4ec22d2c82455ad5a1de701937de49a8
Author: stefan
Category: javax / javafx
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-30 13:15:52
Source code size: 693 bytes / 34 lines
Pitched / IR pitched: No / No
Views / Downloads: 762 / 821
Version history: 1 change(s)
Referenced in: [show references]