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).

!7

import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;

p-awt {
  JFrame frame = showFrame();
  final new JFXPanel fxPanel;
  frame.add(fxPanel);

  jfxLater(r {
    fxPanel.setScene(createScene());
  });
}

// JavaFX World
static Scene createScene() {
  new Group root;
  Scene scene = new Scene(root, Color.ALICEBLUE);
  new Text text;
  
  text.setX(40);
  text.setY(100);
  text.setFont(new Font(25));
  text.setText("Welcome JavaFX!");

  root.getChildren().add(text);
  ret scene;
}

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: 758 / 815
Version history: 1 change(s)
Referenced in: [show references]