Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 13th, 2012  |  syntax: Java  |  size: 0.29 KB  |  views: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public void exit() {
  2.                
  3.         final Test self = this;
  4.                
  5.         Platform.runLater(new Runnable() {
  6.  
  7.                 @Override
  8.                 public void run() {
  9.                         Platform.exit();
  10.                 }
  11.                        
  12.         });
  13.                
  14.         SwingUtilities.invokeLater(new Runnable() {
  15.                        
  16.                 @Override
  17.                 public void run() {
  18.                         self.frame.dispose();
  19.                 }
  20.         });
  21.                
  22. }