/ Published in: Java
The dirty hack you'll have to do, if you want to keep your JavaFX application always on top (e.g. as widget).
Expand |
Embed | Plain Text
package at.kevinschmid; import javafx.application.Platform; import javafx.embed.swing.JFXPanel; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; import javax.swing.JDialog; public class Start extends javafx.application.Application { launch(args); } @Override final JFXPanel fxPanel = new JFXPanel(); @Override public void run() { fxPanel.setScene(scene); } }); jDialog.add(fxPanel); jDialog.setAlwaysOnTop(true); jDialog.setVisible(true); } }
You need to login to post a comment.
