Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. public static void run(Runnable treatment) {
  2.         if(treatment == null) throw new IllegalArgumentException("The treatment to perform can not be null");
  3.  
  4.         if(Platform.isFxApplicationThread()) treatment.run();
  5.         else Platform.runLater(treatment);
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement