Java Code Examples for javafx.embed.swing.JFXPanel#setSize()
The following examples show how to use
javafx.embed.swing.JFXPanel#setSize() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractTopsoilDisplay.java From ET_Redux with Apache License 2.0 | 5 votes |
protected void initFX(JFXPanel fxPanel) { // This method is invoked on the JavaFX thread Scene scene = createScene(); fxPanel.setScene(scene); fxPanel.setSize(myDimension); // this forces resizing setLayout(new BorderLayout()); add(fxPanel, BorderLayout.CENTER); }
Example 2
Source File: JavaFX3DExample.java From chuidiang-ejemplos with GNU Lesser General Public License v3.0 | 5 votes |
public static void initFx(JFXPanel fxPanel) { sphere = new Sphere(100); sphere.setLayoutX(200); sphere.setLayoutY(200); Group root = new Group(sphere); Scene scene = new Scene(root, 900, 600); fxPanel.setScene(scene); fxPanel.setSize(900, 600); }