• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

no output

 
arjun gaur
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm running this code but nothing's happening.no output.just the cursor is blinking in cmd

 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with JavaFX, but with Swing you'd have to take steps to show a GUI after creating it - I don't see anything here that would cause the GUI to be shown.

The last couple of lines in http://docs.oracle.com/javafx/2/get_started/hello_world.htm look like they do that, so maybe your code should do something similar.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15628
46
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right now, your application is creating a GridPane and some other controls such as a button and some text fields, but you're not adding the controls to the GridPane. Just creating those objects doesn't do anything; you have to connect them together. You also don't create a Scene which you have to add to the Stage; and you have to call primaryStage.show() to display it.

See the JavaFX Hello World tutorial for an example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic