Examples of WindowAdapter


Examples of java.awt.event.WindowAdapter

   
    if (canvasPeer instanceof com.xith3d.render.jogl.CanvasPeerImpl)
        ((com.xith3d.render.jogl.CanvasPeerImpl)canvasPeer).setWindow(peerWindow);
   
    // Add Listener to set the window invisible instead of exiting the application
    peerWindow.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                peerWindow.setVisible(false);
            }
    });
   
View Full Code Here

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

Examples of lifesbest23.common.swing.WindowAdapter

  SquaresFrame(){
    super();
    this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    this.setSize(400, 400);
    this.setTitle(String.format("Squares Editor - *New File - %d_%d*", 10, 10));
    this.addWindowListener(new WindowAdapter(){
      @Override public void windowClosing( WindowEvent event )
        {
        exit();
        }
    });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.