In my first approach to JavaFX, the scene is mistakenly displayed and I not find the cause. For example, the following code is proposed in the first basic tutorial from E(fx)clipse's page:
package Aplicacion;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.effect.DropShadow;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Prueba extends Application {
@Override
public void start(Stage primaryStage) {
BorderPane p = new BorderPane();
Text t = new Text("Hello FX");
t.setFont(Font.font("Arial", 60));
t.setEffect(new DropShadow(2,3,3, Color.RED));
p.setCenter(t);
primaryStage.setScene(new Scene(p));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
It should display the text "Hello FX", but shows the following:
My Java version is 8u65 for Windows 64 (Win 7).