Libraryless. Click here for Pure Java version (86L/1K/4K).
!759 import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.embed.swing.SwingNode; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class main extends Application { p { fixContextClassLoader(); launch(); } public void start(Stage stage) { SwingNode swingNode = new SwingNode(); createSwingContent(swingNode); StackPane pane = new StackPane(); pane.getChildren().add(swingNode); stage.setTitle("Swing in JavaFX"); stage.setScene(new Scene(pane, 250, 150)); stage.show(); } void createSwingContent(final SwingNode swingNode) { awt { swingNode.setContent(new JButton("Click me!")); } } }
Began life as a copy of #1003698
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
| ID | Author/Program | Comment | Date |
|---|---|---|---|
| 1255 | stefan | Works! But has a weird bg color change (black to white) | 2016-07-25 23:42:33 |
| Snippet ID: | #1003699 |
| Snippet name: | JavaFX + Swing Test |
| Eternal ID of this version: | #1003699/1 |
| Text MD5: | f1f420690257419dae9a16ae061ac8df |
| Transpilation MD5: | 132e0ec4cc7b3005ee09e2c30ab9d1da |
| Author: | stefan |
| Category: | javax / javafx |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-07-25 23:41:34 |
| Source code size: | 763 bytes / 34 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1077 / 1193 |
| Referenced in: | [show references] |