fork download
  1. package sample;
  2.  
  3. import javafx.application.Platform;
  4. import javafx.embed.swing.JFXPanel;
  5. import org.controlsfx.control.Notifications;
  6.  
  7. public class Main {
  8.  
  9. // @Override
  10. // public void start(Stage primaryStage) throws Exception{
  11. //// Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
  12. // Button notifyButton = new Button("Notify");
  13. // notifier.title("Test").text("Test Notification!").showInformation();
  14. // notifyButton.setOnAction(e -> {
  15. // notifier.title("Test").text("Test Notification!").showInformation();
  16. // });
  17. // primaryStage.setTitle("Hello World");
  18. // primaryStage.setScene(new Scene(notifyButton, 100, 50));
  19. // primaryStage.show();
  20. // }
  21.  
  22.  
  23. public static void main(String[] args) {
  24. new JFXPanel();
  25. Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
  26. }
  27. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:25: error: illegal start of expression
        Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
                           ^
Main.java:25: error: illegal start of expression
        Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
                              ^
Main.java:25: error: illegal start of expression
        Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
                                ^
Main.java:25: error: ';' expected
        Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
                                 ^
Main.java:25: error: illegal start of expression
        Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
                                               ^
Main.java:25: error: ';' expected
        Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
                                                      ^
Main.java:25: error: illegal start of type
        Platform.runLater(() -> { Notifications.create().title("hi").text("there").showInformation(); });
                                                                                                       ^
Main.java:27: error: class, interface, or enum expected
}
^
8 errors
stdout
Standard output is empty