0

I am not able to run javafx program even after installing javafx in eclipse.screeenshot of error I am getting after running javafx program

kleopatra
  • 51,061
  • 28
  • 99
  • 211
  • The class DisplayText is missing. Furthermore all javafx imports are missing. "publicstaticvoid" has to have spaces between the words. – JCWasmx86 Apr 28 '21 at 12:19
  • just seeing that this is a repost of your earlier question - DONT DONT DONT! Instead edit the first to make it answerable. – kleopatra Apr 28 '21 at 13:12

1 Answers1

1

I think you are not installing javafx correctly you can see the video below he can help you This video can help you : https://www.youtube.com/watch?v=_7OM-cMYWbQ&ab_channel=BroCode? And this is the code to test

public class HelloWorld extends Application {
//---------------------------------------------
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("My First JavaFX App");
BorderPane root = new BorderPane();
Button btnHello = new Button("Hello World");
root.setCenter(btnHello);
Scene scene = new Scene(root, 250, 100);
primaryStage.setScene(scene);
primaryStage.show();
}
//---------------------------------------------
public static void main(String[] args) {
launch(args);
}
}
'''