Package java.awt.event

Examples of java.awt.event.WindowListener


    if (maxSize != null) {
      frame.setMaximizedBounds(maxSize);
    }
    frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

    frame.addWindowListener(new WindowListener() {
      public void windowDeactivated(WindowEvent e) {
      }

      public void windowIconified(WindowEvent e) {
      }
View Full Code Here


                }
            }
        });

        // set the window listener
        dialog.addWindowListener(new WindowListener() {
            public void windowClosing(WindowEvent e) {
                close();
            }

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

    bottom3.add(Box.createVerticalStrut(20));
    bottom3.add(new JScrollPane(ta));
    bottom3.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 10));
   
    jf.pack();
    jf.addWindowListener(new WindowListener() {
      public void windowActivated(WindowEvent e)
      {
      }
      public void windowClosed(WindowEvent e)
      {
View Full Code Here

    gui = new MainGui();
    gui.setTitle("SeriesDownloader " + version);
    statusbar = new StatusMessageController(gui.getStatusbar());

    gui.addWindowListener(new WindowListener() {
      public void windowActivated(WindowEvent arg0) {
      }

      public void windowClosed(WindowEvent arg0) {
      }
View Full Code Here

            dialog = new JDialog((Frame)window, title, true);
        } else {
            dialog = new JDialog((Dialog)window, title, true);
        }
        if (window instanceof SwingUtilities.SharedOwnerFrame) {
            WindowListener ownerShutdownListener =
                    SwingUtilities.getSharedOwnerFrameShutdownListener();
            dialog.addWindowListener(ownerShutdownListener);
        }
        initDialog(dialog, style, parentComponent);
        return dialog;
View Full Code Here

                dialog = new JDialog((Frame)window, title, false);
            } else {
                dialog = new JDialog((Dialog)window, title, false);
            }
            if (window instanceof SwingUtilities.SharedOwnerFrame) {
                WindowListener ownerShutdownListener =
                        SwingUtilities.getSharedOwnerFrameShutdownListener();
                dialog.addWindowListener(ownerShutdownListener);
            }
            Container contentPane = dialog.getContentPane();
View Full Code Here

        contentPanel.add(buttonPanel, new GridBagConstraints(1, 4, 6, 0, 0.0,
                0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
                new Insets(0, 0, 0, 0), 0, 0));

        subFrame.addWindowListener(new WindowListener() {

            public void windowOpened(WindowEvent e) {
            }

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

    public void doTag(final XMLOutput output) throws Exception {

        // now lets add this action to its parent if we have one
        ComponentTag tag = (ComponentTag) findAncestorWithClass( ComponentTag.class );
        if ( tag != null ) {
            WindowListener listener = new WindowListener() {
                public void windowActivated(WindowEvent e) {
                    invokeScript( output, e, activated );
                }

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

        final Window _wnd = wnd;
        final double _widthAspect = widthAspect;
        final double _heightAspect = heightAspect;

        final WindowListener l = new WindowAdapter() {
            @Override
            public void windowOpened(WindowEvent e)
            {
                GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
                int screenX = ge.getCenterPoint().x * 2;
 
View Full Code Here

    public static GuiKeeper keepLocationAndSize(Window wnd){
        if (wnd == null) {
            throw new IllegalArgumentException("wnd == null");
        }
        final Window w = wnd;
        final WindowListener l = new WindowAdapter() {
            @Override
            public void windowOpened(WindowEvent e)
            {
                GuiUtil.centerWindow(w);
                w.removeWindowListener(this);
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.