Trying to convert Swing to Java-FX
<p>This is a snippet of my code when I was using Swing:</p>

<pre><code>private static Gui gui;

public static void main(String[] args){
    gui = new Gui(); //(1)
    gui.menu();      //(2)
    gui.show();      //(3)
}
</code></pre>

<ol>
<li>Constructor initialises <code>JFrame</code></li>
<li>Creates <code>JLabel</code> and <code>JPanel</code> and adds them both into frame.</li>
<li>Set frame visibility to <code>true</code>.</li>
</ol>

<p>I've been trying but I can't get the result I want using Java-FX. This is how my last attempt looked:</p>

<pre><code>private static Gui gui;

public static void main(String[] args){
    gui = new Gui();
    Application.launch(Gui.class, args);
    gui.menu();
    gui.show();
}
</code></pre>

<p>Gui class:</p>

<pre><code>private static Stage stage;

public class Gui extends Application {

    publc void start(Stage primaryStage){

    Gui.stage = primaryStage;
    stage.setTitle("title");

    //I read that some method blocking is involved here, I want to go back!
    }

    public void menu(){

    BorderPane abc = new BorderPane();
    Scene scene = new Scene(abc, 200, 200);
    stage.setScene(scene);

    //if I somehow mange to reach this part, there will be some null pointer
    //exception, well everything looks real initialised to me
    }

    public void show(){

    stage.show();

    //I have never reach this part
    }
}
</code></pre>