public static void main(String args[]) throws Exception {
// When running on OS X, display app menu in the right place (i.e. not the app window)
System.setProperty("apple.laf.useScreenMenuBar", "true");
JFrame ownerFrame = new JFrame("JetS3t Cockpit");
ownerFrame.addWindowListener(new WindowListener() {
public void windowOpened(WindowEvent e) {
}
public void windowClosing(WindowEvent e) {
e.getWindow().dispose();
}