0
Good morning,
I’m having a hard time with Javafx. I installed E(fx)clipse version 3.4.1
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Hello World!");
Button btn = new Button();
btn.setText("Say 'Hello World'");
btn.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Hello World!");
}
});
}
public static void main(String[] args) {
launch(args);
}
}
The application runs without errors. However the window does not appear. Only the icon appears in the dock.
Try running with Java 8. Unless mistakenly e(fx)clipse is not yet compatible with java 9+
– Gustavo Fragoso