title: Sending notification with javafx without stage
body: <p>You can send a desktop notification with JavaFx like this (requires jdk 8u20 or later):</p>
  
  <pre><code>package sample;
  
  import javafx.application.Application;
  import javafx.scene.Scene;
  import javafx.scene.control.Button;
  import javafx.stage.Stage;
  import org.controlsfx.control.Notifications;
  
  public class Main extends Application {
  
      @Override
      public void start(Stage primaryStage) throws Exception{
  //        Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
          Button notifyButton = new Button("Notify");
          notifyButton.setOnAction(e -&gt; {
              Notifications.create().title("Test").text("Test Notification!").showInformation();
          });
          primaryStage.setTitle("Hello World");
          primaryStage.setScene(new Scene(notifyButton, 100, 50));
          primaryStage.show();
      }
  
  
      public static void main(String[] args) {
          launch(args);
      }
  }
  </code></pre>
  
  <p>But this way you have to create a main window (stage), is it possible to avoid this? I am looking for a way to send notification like using zenity in bash: most of the code is non-gui, but uses some gui elements for informing or interacting with user in a very basic fashion.</p>