Examples of addWindowListener()


Examples of java.awt.Frame.addWindowListener()

                final Frame f = new Frame("System Configuration Error");
                f.add(new Label("Java version 1.4 or later is required to run this program."), BorderLayout.NORTH);
                f.add(new Label("Please download it from http://java.sun.com/"), BorderLayout.SOUTH);
                f.pack();
                f.setVisible(true);
                f.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        synchronized (f) {
                            f.notifyAll();
                        }
                    }
View Full Code Here

Examples of java.awt.Frame.addWindowListener()

        cbuf[0] = (char) ch;
        mp.append(new String(cbuf));
        ch = st.read();
      }
      final Frame top  = new Frame("Show URL");
      top.addWindowListener(
        new WindowAdapter() {

          public void windowClosing(WindowEvent windowEvent) {
            top.dispose();
          }
View Full Code Here

Examples of java.awt.Frame.addWindowListener()

  public void urlAccessViolation(String url) {
    TextArea mp      = new TextArea("Bad URL\n" +
        "There was a security exception accessing the url\n" + url +
        "\nremember, applets can only load urls from the same server");
    final Frame top  = new Frame("Bad URL");
    top.addWindowListener(
      new WindowAdapter() {

        public void windowClosing(WindowEvent windowEvent) {
          top.dispose();
        }
View Full Code Here

Examples of java.awt.Frame.addWindowListener()

        cbuf[0] = (char) ch;
        mp.append(new String(cbuf));
        ch = st.read();
      }
      final Frame top  = new Frame("Show URL");
      top.addWindowListener(
        new WindowAdapter() {

          public void windowClosing(WindowEvent windowEvent) {
            top.dispose();
          }
View Full Code Here

Examples of java.awt.Frame.addWindowListener()

    table.setCellRenderer(Image.class, new TestImageTableCellRenderer());
    frame.setLayout(new BorderLayout());
    frame.add(table, BorderLayout.CENTER);
    frame.setSize(new Dimension(800, 600));
    UIUtil.positionComponent(UIUtil.CENTER, frame);
    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent evt) {
        System.exit(0);
      }
    });
    frame.setVisible(true);
View Full Code Here

Examples of java.awt.Frame.addWindowListener()

    tabs.setSelectedTab(1);

    frame.add(tabs, BorderLayout.CENTER);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent evt) {
        System.exit(0);
      }

    });
View Full Code Here

Examples of java.awt.Window.addWindowListener()

        Logger.debug("addOverlay(overlay={})", overlay);
        if(overlay != null) {
            this.overlay = overlay;
            Window window = (Window)SwingUtilities.getAncestorOfClass(Window.class, videoSurface.canvas());
            if(window != null) {
                window.addWindowListener(overlayWindowAdapter);
            }
            else {
                // This should not be possible
                Logger.warn("Failed to find a Window ancestor for the video surface Canvas");
            }
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

    if (PropertyDialog.getParentDialog(this) != null)
      jdtmp = new JDialog(PropertyDialog.getParentDialog(this), "Information");
    else
      jdtmp = new JDialog(PropertyDialog.getParentFrame(this), "Information");
    final JDialog jd = jdtmp;
    jd.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        jd.dispose();
        if (m_HelpDialog == jd) {
          m_HelpBut.setEnabled(true);
        }
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

      }
    });

    configure.pack();

    configure.addWindowListener(new WindowAdapter() {
      public void windowDeactivated(WindowEvent e) {
        if(!form.isSearchFieldsSelectionDialogVisible()) {
          ((JDialog)e.getSource()).setVisible(false);
          mSearchFormSettings = form.getSearchFormSettings();
          saveSearchFormSettings();
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

 
  final JDialog jd =
    new JDialog(PropertyDialog.getParentFrame(ClassifierPanel.this), "Classifier evaluation options");
  jd.getContentPane().setLayout(new BorderLayout());
  jd.getContentPane().add(all, BorderLayout.CENTER);
  jd.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent w) {
      jd.dispose();
      m_MoreOptions.setEnabled(true);
    }
  });
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.