Package javax.swing

Examples of javax.swing.JDialog.addWindowListener()


    }
  } else if (rootPane instanceof JDialog) {
    JDialog dialog = (JDialog) rootPane;
    dialog.setDefaultCloseOperation(oldDefaultCloseOperation);
    for (WindowListener listener : oldWindowListeners) {
    dialog.addWindowListener(listener);
    }
  } else if (rootPane instanceof JInternalFrame) {
    JInternalFrame frame = (JInternalFrame) rootPane;
    frame.setDefaultCloseOperation(oldDefaultCloseOperation);
    for (InternalFrameListener listener : oldInternalFrameListeners) {
View Full Code Here


                JOptionPane.getFrameForComponent(parentComponent),
                title,
                ModalityType.DOCUMENT_MODAL
        );
        dialog.setContentPane(pane);
        dialog.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                pane.setValue(JOptionPane.CLOSED_OPTION);
                super.windowClosed(e);
            }
View Full Code Here

      progressDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

      progressDialog.getRootPane().setDefaultButton(button);
      progressDialog.setSize(800, 300);
      progressDialog.setLocationRelativeTo(ScriptRunner.this);
      progressDialog.addWindowListener(new WindowAdapter() {
        public void windowClosed(WindowEvent e) {
          abort.actionPerformed(null);
        }
      });
      progressDialog.setVisible(true);
View Full Code Here

                    frame.getContentPane().add(
                            new ManutencaoContas().createPanel());
                    frame.pack();
                    frame.setVisible(true);

                    frame.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent evt) {
                            System.exit(0);
                        }
                    });
                } catch (Exception e) {
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                dialog.dispose();
            }
        });
       
        dialog.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                panel.close();
            }
        });
View Full Code Here

      mouseEvent = new MouseEvent(window, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, 0, false, 0);
    } else {
      mouseEvent = new MouseEvent(window, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, Integer.MIN_VALUE, Integer.MIN_VALUE, 0, false, 0);
    }
    window.dispatchEvent(mouseEvent);
    dialog.addWindowListener(new WindowAdapter() {
      @Override
      public void windowOpened(WindowEvent e) {
        final NativeModalComponent nativeModalComponent = new NativeModalComponent();
        dialog.getContentPane().add(nativeModalComponent.createEmbeddableComponent(new HashMap<Object, Object>()), BorderLayout.CENTER);
        nativeModalComponent.initializeNativePeer();
View Full Code Here

      progressDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

      progressDialog.getRootPane().setDefaultButton(button);
      progressDialog.setSize(800, 300);
      progressDialog.setLocationRelativeTo(ScriptRunner.this);
      progressDialog.addWindowListener(new WindowAdapter() {
        public void windowClosed(WindowEvent e) {
          abort.actionPerformed(null);
        }
      });
      progressDialog.setVisible(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.