Package javax.swing

Examples of javax.swing.JFrame.addWindowListener()


        System.exit(0);
      }
    };

    JFrame frame = new JFrame("JCalendar Demo");
    frame.addWindowListener(l);

    JCalendarDemo demo = new JCalendarDemo();
    demo.init();
    frame.getContentPane().add(demo);
    frame.pack();
View Full Code Here


    g.drawImage(image, 0, 0, this);
  }

  public static void main(String[] a) {
    JFrame f = new JFrame();
    f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        System.exit(0);
      }
    });
    f.setContentPane(new Main());
View Full Code Here

    } // main

    public static void makeFrame() {
        // Set up a GUI framework
        JFrame frame = new JFrame("DOM Echo");
        frame.addWindowListener(
          new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
          } 
        );
View Full Code Here

    } // main

    public static void makeFrame() {
        // Set up a GUI framework
        JFrame frame = new JFrame("DOM Echo");
        frame.addWindowListener(
          new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
          } 
        );
View Full Code Here

    } // main

    public static void makeFrame() {
        // Set up a GUI framework
        JFrame frame = new JFrame("DOM Echo");
        frame.addWindowListener(
          new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
          } 
        );
View Full Code Here

    } // main

    public static void makeFrame() {
        // Set up a GUI framework
        JFrame frame = new JFrame("DOM Echo");
        frame.addWindowListener(
          new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
          } 
        );
View Full Code Here

    } // main

    public static void makeFrame() {
        // Set up a GUI framework
        JFrame frame = new JFrame("DOM Echo");
        frame.addWindowListener(
          new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
          } 
        );
View Full Code Here

                }
            }
        };

        frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        frame.addWindowListener(windowListener);

        // for testing purpose only
        if (DEBUG) {
            frame.removeWindowListener(windowListener);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
View Full Code Here

  }

  @SuppressWarnings("deprecation")
  public static void main(String[] args) {
    JFrame frame = new MouseHoverTable("Table Example");
    frame.addWindowListener(new WindowAdapter() {
      @Override
      public void windowClosing(WindowEvent e) {
        Window w = e.getWindow();
        w.setVisible(false);
        w.dispose();
View Full Code Here

  private ScrollExample(URL url)
  {
    JFrame frame = new JFrame("ScrollExample: "+url.getFile());
    frame.setResizable(true);
    frame.setSize(new Dimension(500,500));
                frame.addWindowListener(new java.awt.event.WindowAdapter() {
                        public void windowClosing
                            (java.awt.event.WindowEvent e) {
                            System.exit(0);
                        }
                    });
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.