Package java.awt.event

Examples of java.awt.event.WindowListener


  /**
   * Displays the GUI during a RAD session. If the root component is neither a JFrame nor a JDialog, the a JFrame is
   * instantiated and the root is added into the new frames contentpane.
   */
  public void test() {
    WindowListener wl = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        super.windowClosing(e);
        System.exit(0);
      }
    };
View Full Code Here


     // don't share, or you might end up listening to stale old windows...
     // do window listeners keep a pointer to the things they listen to, or is it the other way around?
     // it seems like it's probably the other way around.
     // in which case, it's bad for observable things to stay around for longer than their observers.
     // anyways, the overhead of making a new one is pretty small.
     return new WindowListener() {
         public void windowActivated(WindowEvent e) {
           // nothing...
         }
         public void windowClosed(WindowEvent e) {
           node.store();
View Full Code Here

    } else
      currentLocale = Locale.getDefault();

    frame = new BankAdmin(currentLocale);
    frame.setTitle(messages.getString("CustAndAccountAdmin"));
    WindowListener l = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
  System.exit(0);
      }
    };
    frame.addWindowListener(l);
View Full Code Here

  /**
   * Displays the GUI during a RAD session. If the root component is neither a JFrame nor a JDialog, the a JFrame is
   * instantiated and the root is added into the new frames contentpane.
   */
  public void test() {
    WindowListener wl = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        super.windowClosing(e);
        System.exit(0);
      }
    };
View Full Code Here

        p0.add(eventViewer);
        center_panel.add(p0, BorderLayout.SOUTH);

        final TCTool tctool = this;

        WindowListener wl = new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                memoryChart.stop();

                cache.deleteObserver(tctool);
                cache.disableDiagnostics();
View Full Code Here

      }
    });
  }

  public static void addWinListener(final FBEdit fbedit) {
    fbedit.addWindowListener(new WindowListener() {

      public void windowOpened(WindowEvent windowevent) {
      }

      public void windowClosing(WindowEvent e) {
View Full Code Here

        frame.add(text, BorderLayout.CENTER);
        frame.add(southPanel, BorderLayout.SOUTH);
        frame.pack();

        frame.addWindowListener(new WindowListener() {
            @Override
            public void windowOpened(WindowEvent e) {}

            @Override
            public void windowClosing(WindowEvent e) {
View Full Code Here

    harness.check(correctException, true);
    correctException = false;
   
    // The create method should throw a NullPointerException if the target object is null.
    try {
      WindowListener w = (WindowListener) EventHandler.create(WindowListener.class, null, "bla", "foo", "windowClosing");
    } catch (Exception e) {
      correctException = e.getClass() == NullPointerException.class;
    }
    harness.check(correctException, true);
    correctException = false;
View Full Code Here

                return examples.get(index);
            }
        };
        examplesList.setModel(model);
       
        this.addWindowListener(new WindowListener() {

            @Override
            public void windowOpened(WindowEvent e) {
            }
View Full Code Here

        class PicEditToolBarUIDialog extends JDialog {
            PicEditToolBarUIDialog() {
                this.getRootPane().putClientProperty("Window.style", "small");
                this.setResizable(false);
                this.setAlwaysOnTop(true);
                WindowListener windowListener = createFrameListener();
                this.addWindowListener(windowListener);
            }
View Full Code Here

TOP

Related Classes of java.awt.event.WindowListener

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.