title: Button cannot be covert to node, method list add(node) is not applicable
body: <p>I'm beginner at JavaFx. I tried to run basic things i.e button but i'm not able due to some compilation error i.e. Button cannot be covert to node, method list add(node) is not applicable <a href="https://i.stack.imgur.com/n6Bq1.png" rel="nofollow noreferrer">This is my simple code to run program in netbeans</a></p>
  
  <h1>Code</h1>
  
  <p>public class Hello extends Application{
       Button btn;</p>
  
  <pre><code> public static void main(String[] args) {
      launch(args);
  }
  
  @Override
  public void start(Stage primaryStage) throws Exception {
   primaryStage.setTitle("I'm beginner");
  
    btn=new Button("Click me");
    StackPane root=new StackPane();
    root.getChildren().add(btn);
    Scene scene=new Scene(root,350,400);
    primaryStage.setScene(scene);
  
      primaryStage.show();
  }
  </code></pre>
  
  <p>}</p>