Reputation: 31
I have known how to embed JavaFX content into Swing applications according to this Oracle Tutorial.
But now I want to add some Swing components to the JavaFX Scene. Is there any ideas about that?
Regards, Qin
Upvotes: 2
Views: 3016
Reputation: 2513
now it's possible to do that
what you need now is install jdk 8
because swing content in javafx is introduced in jdk8
@FXML
private SwingNode swingNode;
...
JasperPrint jasperPrint = JasperFillManager.fillReport(FileName, hash, connect);
swingNode.setContent(new JRViewer(jasperPrint));
oracle just add tutorial for this too
for the next you can follow this link
oracle tutorial embed swing in javaFX
Upvotes: 3
Reputation: 2714
I think it is not possible in JavaFX 2.*, but some people hava worked on it. Take a look here : http://www.jroller.com/neugens/entry/embed_swing_inside_javafx_2 . Maybe you will find what you want. :)
Upvotes: 1