fork download
  1. package tests;
  2.  
  3. import javafx.application.Platform;
  4. import javafx.scene.Group;
  5. import javafx.scene.Scene;
  6. import javafx.scene.control.ComboBox;
  7. import javafx.scene.image.Image;
  8. import javafx.scene.layout.Background;
  9. import javafx.scene.layout.BackgroundImage;
  10. import javafx.scene.layout.VBox;
  11. import javafx.scene.paint.Color;
  12.  
  13. import com.jme3.app.SimpleApplication;
  14. import com.jme3.math.ColorRGBA;
  15. import com.jme3x.jfx.JmeFxContainer;
  16.  
  17. public class TestJavaFXAlpha extends SimpleApplication {
  18.  
  19. private static Group root;
  20. private static ComboBox<String> comboBox;
  21.  
  22. public static void main(String[] args) {
  23. new TestJavaFXAlpha().start();
  24. }
  25.  
  26. @Override
  27. public void simpleInitApp() {
  28. this.setPauseOnLostFocus(false);
  29. this.flyCam.setDragToRotate(true);
  30. final JmeFxContainer jmefx = JmeFxContainer.install(this, getGuiNode(), true, null);
  31. Platform.runLater(new Runnable() {
  32.  
  33. @Override
  34. public void run() {
  35. jmefx.setScene(createScene(), root);
  36. }
  37. });
  38.  
  39. this.guiNode.attachChild(jmefx.getJmeNode());
  40.  
  41. this.viewPort.setBackgroundColor(ColorRGBA.Black);
  42. }
  43.  
  44. public static Scene createScene() {
  45.  
  46. root = new Group();
  47.  
  48. Scene scene = new Scene(root, 600, 600, true);
  49. scene.setFill(new Color(0, 0, 0, 0));
  50.  
  51. VBox container = new VBox();
  52. container.prefWidthProperty().bind(scene.widthProperty());
  53. container.prefHeightProperty().bind(scene.heightProperty());
  54. container.setBackground(new Background(new BackgroundImage(new Image("http://i...content-available-to-author-only...r.com/7cJy8nk.png"), null, null, null, null)));
  55.  
  56. root.getChildren().add(container);
  57.  
  58. return scene;
  59. }
  60. }
  61.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:17: error: class TestJavaFXAlpha is public, should be declared in a file named TestJavaFXAlpha.java
public class TestJavaFXAlpha extends SimpleApplication {
       ^
Main.java:3: error: package javafx.application does not exist
import javafx.application.Platform;
                         ^
Main.java:4: error: package javafx.scene does not exist
import javafx.scene.Group;
                   ^
Main.java:5: error: package javafx.scene does not exist
import javafx.scene.Scene;
                   ^
Main.java:6: error: package javafx.scene.control does not exist
import javafx.scene.control.ComboBox;
                           ^
Main.java:7: error: package javafx.scene.image does not exist
import javafx.scene.image.Image;
                         ^
Main.java:8: error: package javafx.scene.layout does not exist
import javafx.scene.layout.Background;
                          ^
Main.java:9: error: package javafx.scene.layout does not exist
import javafx.scene.layout.BackgroundImage;
                          ^
Main.java:10: error: package javafx.scene.layout does not exist
import javafx.scene.layout.VBox;
                          ^
Main.java:11: error: package javafx.scene.paint does not exist
import javafx.scene.paint.Color;
                         ^
Main.java:13: error: package com.jme3.app does not exist
import com.jme3.app.SimpleApplication;
                   ^
Main.java:14: error: package com.jme3.math does not exist
import com.jme3.math.ColorRGBA;
                    ^
Main.java:15: error: package com.jme3x.jfx does not exist
import com.jme3x.jfx.JmeFxContainer;
                    ^
Main.java:17: error: cannot find symbol
public class TestJavaFXAlpha extends SimpleApplication {
                                     ^
  symbol: class SimpleApplication
Main.java:19: error: cannot find symbol
	private static Group root;
	               ^
  symbol:   class Group
  location: class TestJavaFXAlpha
Main.java:20: error: cannot find symbol
	private static ComboBox<String> comboBox;
	               ^
  symbol:   class ComboBox
  location: class TestJavaFXAlpha
Main.java:44: error: cannot find symbol
	public static Scene createScene() {
	              ^
  symbol:   class Scene
  location: class TestJavaFXAlpha
Main.java:23: error: cannot find symbol
		new TestJavaFXAlpha().start();
		                     ^
  symbol:   method start()
  location: class TestJavaFXAlpha
Main.java:28: error: cannot find symbol
		this.setPauseOnLostFocus(false);
		    ^
  symbol: method setPauseOnLostFocus(boolean)
Main.java:29: error: cannot find symbol
		this.flyCam.setDragToRotate(true);
		    ^
  symbol: variable flyCam
Main.java:30: error: cannot find symbol
		final JmeFxContainer jmefx = JmeFxContainer.install(this, getGuiNode(), true, null);
		      ^
  symbol:   class JmeFxContainer
  location: class TestJavaFXAlpha
Main.java:30: error: cannot find symbol
		final JmeFxContainer jmefx = JmeFxContainer.install(this, getGuiNode(), true, null);
		                                                          ^
  symbol:   method getGuiNode()
  location: class TestJavaFXAlpha
Main.java:30: error: cannot find symbol
		final JmeFxContainer jmefx = JmeFxContainer.install(this, getGuiNode(), true, null);
		                             ^
  symbol:   variable JmeFxContainer
  location: class TestJavaFXAlpha
Main.java:31: error: cannot find symbol
		Platform.runLater(new Runnable() {
		^
  symbol:   variable Platform
  location: class TestJavaFXAlpha
Main.java:39: error: cannot find symbol
		this.guiNode.attachChild(jmefx.getJmeNode());
		    ^
  symbol: variable guiNode
Main.java:41: error: cannot find symbol
		this.viewPort.setBackgroundColor(ColorRGBA.Black);
		                                 ^
  symbol:   variable ColorRGBA
  location: class TestJavaFXAlpha
Main.java:41: error: cannot find symbol
		this.viewPort.setBackgroundColor(ColorRGBA.Black);
		    ^
  symbol: variable viewPort
Main.java:26: error: method does not override or implement a method from a supertype
	@Override
	^
Main.java:46: error: cannot find symbol
		root = new Group();
		           ^
  symbol:   class Group
  location: class TestJavaFXAlpha
Main.java:48: error: cannot find symbol
		Scene scene = new Scene(root, 600, 600, true);
		^
  symbol:   class Scene
  location: class TestJavaFXAlpha
Main.java:48: error: cannot find symbol
		Scene scene = new Scene(root, 600, 600, true);
		                  ^
  symbol:   class Scene
  location: class TestJavaFXAlpha
Main.java:49: error: cannot find symbol
		scene.setFill(new Color(0, 0, 0, 0));
		                  ^
  symbol:   class Color
  location: class TestJavaFXAlpha
Main.java:51: error: cannot find symbol
		VBox container = new VBox();
		^
  symbol:   class VBox
  location: class TestJavaFXAlpha
Main.java:51: error: cannot find symbol
		VBox container = new VBox();
		                     ^
  symbol:   class VBox
  location: class TestJavaFXAlpha
Main.java:54: error: cannot find symbol
		container.setBackground(new Background(new BackgroundImage(new Image("http://i.imgur.com/7cJy8nk.png"), null, null, null, null)));
		                            ^
  symbol:   class Background
  location: class TestJavaFXAlpha
Main.java:54: error: cannot find symbol
		container.setBackground(new Background(new BackgroundImage(new Image("http://i.imgur.com/7cJy8nk.png"), null, null, null, null)));
		                                           ^
  symbol:   class BackgroundImage
  location: class TestJavaFXAlpha
Main.java:54: error: cannot find symbol
		container.setBackground(new Background(new BackgroundImage(new Image("http://i.imgur.com/7cJy8nk.png"), null, null, null, null)));
		                                                               ^
  symbol:   class Image
  location: class TestJavaFXAlpha
37 errors
stdout
Standard output is empty