Package java.awt.event

Examples of java.awt.event.WindowAdapter


      } catch (IOException e1) {
        e1.printStackTrace();
        System.exit(0);
      }

      f.addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e){
          new TestBinary(buffer,args[0]);
        }
      });

      f.pack();
      f.show();
    }
    else{
      JFrame f=new JFrame("Reading Binary Socket");
      LoggingBufferPanel lp=new LoggingBufferPanel(f,"test",null);
      f.getContentPane().add(lp);

      final LoggingEntryByteBuffer buffer=lp.getBuffer();
      try {
        buffer.openServer(4321);
        ((LoggingBufferTableModel)lp.getLogbookModel()).startRefreshLoop();
      } catch(IOException ie){
        ie.printStackTrace();
        System.exit(0);
      }
      Logger lr = null;
      try {
        SocketBufferHandler sbh=new SocketBufferHandler("localhost",4321);
        lr=Logger.getLogger("TEST");
        lr.addHandler(sbh);
        lr.setUseParentHandlers(false);
        lr.warning("Start");
      } catch (IOException e) {
        e.printStackTrace();
        System.exit(0);
      }
      f.addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e){
          try {
            buffer.closeServer();
          } catch (IOException e1) {
            e1.printStackTrace();
View Full Code Here


      } catch (IOException e1) {
        e1.printStackTrace();
        System.exit(0);
      }

      f2.addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e){
          System.exit(0);
        }
      });
View Full Code Here

   * For testing
   * @param args
   */
  public static void main(String[] args) {
    JFrame f=new JFrame("Logging");
    f.addWindowListener( new WindowAdapter() {
      public void windowClosing(WindowEvent e){
        System.exit(0);
      }
    });
    LoggingPanel lp=new LoggingPanel(f,"test",null);
View Full Code Here

    editor=new SceneGraphEditor(sceneTree, pluginManager);
   
    Java3DSyn3DBuiltin builtin = (Java3DSyn3DBuiltin)pluginManager.getPlugin(Java3DSyn3DBuiltin.class);
    builtin.createFromKey("Scene",tm.getRootNode());
        getContentPane().add(new JScrollPane(sceneTree));
        this.addWindowListener(new WindowAdapter(){
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
    }
View Full Code Here

        //set the singleton.
        instance = this;
    init();
    setTitle(getString("title"));
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        quitAction();
      }
    });
    createContent();
View Full Code Here

    p.add(b);

    getContentPane().add(BorderLayout.NORTH, p);

    // on exit
    addWindowListener( new WindowAdapter() {
      public void windowClosing(WindowEvent e){
        System.exit(0);
      }
    });
   
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        System.exit(0); // Cancels installation
      }
    });

    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        System.exit(0); // Cancels installation
      }
    });
   
View Full Code Here

  public JSynopticFrame(JFrame frame, Vector commands) {
    super(commands, frame, frame.getContentPane());
   
    // on exit
    frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        exit();
      }
    });
  }
View Full Code Here

            Run.loadPlugin(st.nextToken());
        }

        HelpViewer e = new HelpViewer(new JFrame(), "JSynoptic help");
        e.setSize(1000, 600);
        e.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent ev) {
                System.exit(0);
            }
        });
        e.show();
View Full Code Here

      }
    }
    dialog.pack();

    dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    dialog.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        dispose();
      }
    });
   
View Full Code Here

TOP

Related Classes of java.awt.event.WindowAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.