Package java.awt

Examples of java.awt.Window.dispose()


public class BasicWindowMonitor extends WindowAdapter {

  public void windowClosing(WindowEvent e) {
    Window w = e.getWindow();
    w.setVisible(false);
    w.dispose();
    System.exit(0);
  }
}
View Full Code Here


    {
        Window w = (Window) peer.getComponent();
        String value = (String) inputForm.get(peer.getId());
        if ("close".equals(value))
        {
            w.dispose();
        } else
        {
            _logger.warning("Unknown action " + value + " to " + w);
        }
        return;
View Full Code Here

      // Log.debug (currentToolbar.getParent());
      final Window w = SwingUtilities.windowForComponent(toolBar);
      if (w != null)
      {
        w.setVisible(false);
        w.dispose();
      }
    }
    toolBar.setVisible(false);
  }
View Full Code Here

            if (source == closeButton) {
                dispose();
            } else {
                Window w = (Window) windows.get(source);
                if (w.isVisible())
                    w.dispose();
                else {
                    w.setVisible(true);
                }
            }
        }
View Full Code Here

      finally {
  sm.uninstall();
      }

      window.setVisible(false);
      window.dispose();
    }
    catch (Exception ex) {
      harness.debug(ex);
      harness.check(false, "Unexpected exception");
    }
View Full Code Here

        closeButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Window win = SwingUtilities.getWindowAncestor(DeviceInfoPanel.this);
                win.setVisible(false);
                win.dispose();
            }
        });
    }

    /**
 
View Full Code Here

    }//GEN-LAST:event_jButtonBrowseSiteActionPerformed
   
    private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCloseActionPerformed
        Window w = ((Window)this.getTopLevelAncestor());
        w.setVisible(false);
        w.dispose();
    }//GEN-LAST:event_jButtonCloseActionPerformed
   
    private void jButtonClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonClearActionPerformed
        jTextAreaLog.setText("");
    }//GEN-LAST:event_jButtonClearActionPerformed
View Full Code Here

            initialIndex, flavor, attributes, dialogOwner);

    dialog.show();

    if (dialogOwner != activeWindow) {
        dialogOwner.dispose();
    }

    if (dialog.getResult() == ServiceUIDialog.APPROVE_PRINT) {
        attributes.clear();
        attributes.addAll(dialog.getAttributes());
View Full Code Here

    frame.addWindowListener(new WindowAdapter() {
      @Override
      public void windowClosing(WindowEvent e) {
        Window w = e.getWindow();
        w.setVisible(false);
        w.dispose();
        System.exit(0);
      }
    });
    frame.pack();
    frame.show();
View Full Code Here

    }
   
    static class DisposeOnClose extends ComponentAdapter implements Serializable{
        public void componentHidden(ComponentEvent e) {
            Window w = (Window)e.getComponent();
            w.dispose();
        }
    }
   
}
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.