Package java.awt.event

Examples of java.awt.event.WindowAdapter


   */
  protected JDialog createDialog(final Component c, String name){
    JDialog jd=new JDialog(owner, name);
    jd.getContentPane().add(c);
    jd.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    jd.addWindowListener(new WindowAdapter(){

      public void windowClosed(WindowEvent e) {
        Element el=getElement(c);
        changeElement(c,el.previousMode);
      }
View Full Code Here


     *
     * @param args
     */
    public static void main(String[] args) {
        JFrame jf = new JFrame();
        jf.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        JTextField preview = new JTextField("Test");
View Full Code Here

        JFrame frame = new JFrame (CheckBoxListTest.class.getName());
        frame.getContentPane().add (scroller);
        frame.pack();
        frame.setVisible(true);
       
    frame.addWindowListener(new WindowAdapter(){

      public void windowClosing(WindowEvent e) {
        boolean[] res=list.getCheckedItems();
        for(int i=0;i<listItems.length;i++){
          System.out.println(listItems[i]+" "+res[i]);
View Full Code Here

    f.getContentPane().add(stc,BorderLayout.CENTER);
    System.out.println("CENTER=====================");
    stc.print();

    f.setDefaultCloseOperation(javax.swing.JFrame.DISPOSE_ON_CLOSE);
    f.addWindowListener(new WindowAdapter(){
      public void windowClosing(WindowEvent e) {
        stc.save(userProperties,"center");
        userProperties.write();
        System.exit(0);
      }
View Full Code Here

                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

      }
    }
    dialog.pack();
   
    dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    dialog.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        dispose();
      }
    });
   
View Full Code Here

        frame = new JFrame( locator.toString() );

        //  Allow window to close
        frame.addWindowListener(
            new WindowAdapter() {
                @Override
        public void windowClosing(WindowEvent e) {
                    System.exit(0);
                }
            }
View Full Code Here

                pane.add(vis, BorderLayout.CENTER);
            }

            if( i == master ) {
                f.setTitle("Master Player");
    f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
      System.exit(0);
        }
                });
View Full Code Here

        String media = args[0];

  JFrame f = new JFrame(media);

  f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent event) {
     System.exit(0);
      }
  });
View Full Code Here

        JFrame f = new JFrame(media);

        //  Allow window to close
        f.addWindowListener(
            new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
                }
            }
        );
View Full Code Here

TOP

Related Classes of java.awt.event.WindowAdapter

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.