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