Package java.awt.event

Examples of java.awt.event.WindowAdapter


   
    // Retrieves a HexFrame for editing within a separate window
    public HexFrame getHexFrame(Project proj) {
      if (hexFrame == null) {
        hexFrame = new HexFrame(proj, getContents());
        hexFrame.addWindowListener(new WindowAdapter() {
          @Override
          public void windowClosed(WindowEvent e) {
            hexFrame = null;
          }
        });
View Full Code Here


   * Create the application.
   */
  public EverboxManager() {
    initialize();
    resetConfig();
    frmEverbox.addWindowListener(new WindowAdapter() {
      @Override
      public void windowClosing(WindowEvent e) {
        if(stopClientButton.isEnabled()) {
          JOptionPane.showConfirmDialog(frmEverbox, "客户端仍在运行,请先按停止按钮");
        } else {
View Full Code Here

    button.addActionListener(this);

    getContentPane().add(efl.getPanel(), BorderLayout.CENTER);
    getContentPane().add(buttonPanel, BorderLayout.SOUTH);

    addWindowListener(new WindowAdapter() {
  public void windowClosing(WindowEvent e) {
      dispose();
  }
  });
View Full Code Here

    button.addActionListener(this);

    getContentPane().add(efl.getPanel(), BorderLayout.CENTER);
    getContentPane().add(buttonPanel, BorderLayout.SOUTH);

    addWindowListener(new WindowAdapter() {
  public void windowClosing(WindowEvent e) {
      dispose();
  }
  });
View Full Code Here

  }
 
  private void createGui() {
    mInstance = this;
   
    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        mInstance = null;
      }
    });
   
View Full Code Here

        }
      });
    }

    mDialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    mDialog.addWindowListener(new WindowAdapter() {
      public void windowClosing(final WindowEvent e) {
        close();
      }
    });
View Full Code Here

  public static void main(final String[] args) throws Exception
  {
    final PreviewFrame d = new PreviewFrame(getReport());
    d.pack();
    d.addWindowListener(new WindowAdapter()
    {
      /**
       * Invoked when a window is in the process of being closed.
       * The close operation can be overridden at this point.
       */
 
View Full Code Here

        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        singlePaneUIInstance.aboutToShow();

        frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                close();
            }
        });
View Full Code Here

        // Use a Border layout manager
        getContentPane().setLayout(new BorderLayout());

        // Call quit when the window's close box is clicked.
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                quit();
            }
        });
View Full Code Here

        mainPanel.add(createOkCancelPanel(), BorderLayout.SOUTH);

        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
        dialog.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                close(false);
            }
        });
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.