Simon Fell > Its just code > Swingers

Wednesday, March 5, 2003

Question for anyone who know's swing, given this class
import javax.swing.JOptionPane ;
class foo
 public static void main(String [] args)
  int btn = JOptionPane.showConfirmDialog(null, 
   "hello world!", 
  System.out.println("button was " + btn ) ;
how do i make it exit once I've clicked one of the buttons on the dialog ? update found this thread on exiting swing apps, If this is true, then it seems like a lame ass design descision to me.