title: Netbeans not executing JavaFX application properly
body: <p>I am starting up with javaFX application on Netbeans and trying sample codes. Problem I am facing is that when I run the code from Netbeans the application runs successfully but buttons are not arranged properly. But when I run it from the jar file from binary folder it works fine. is there any fix for that in Netbeans ?</p>
  
  <p>here is the code I am using:</p>
  
  <pre><code>package guiexperiments;
  
  import javafx.application.Application;
  import javafx.scene.Scene;
  import javafx.scene.control.Button;
  import javafx.stage.Stage;
  
  public class GUIExperiments extends Application {
  
  @Override
  public void start(Stage primaryStage) {
      Button btOK = new Button("OK");
      Scene scene = new Scene(btOK, 300, 350); 
      primaryStage.setTitle("MyJavaFX"); // Set the stage title 
      primaryStage.setScene(scene); // Place the scene in the stage 
      primaryStage.show(); // Display the stage
  
  
      Stage stage = new Stage(); // Create a new stage 
      stage.setTitle("Second Stage"); // Set the stage title
      // Set a scene with a button in the stage
      stage.setScene(new Scene(new Button("New Stage"), 300, 300)); stage.show();
      stage.setResizable(false);
  
  }
  
  public static void main(String[] args) {
      Application.launch(args);
  }
  
  }
  </code></pre>
  
  <p>Sorry can't post images as I need 10 reputation points to post images ... urgh.</p>