Package javax.swing

Examples of javax.swing.JFrame.addWindowListener()


      } catch (IOException e1) {
        e1.printStackTrace();
        System.exit(0);
      }

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


   * For testing
   * @param args
   */
  public static void main(String[] args) {
    JFrame f=new JFrame("Logging");
    f.addWindowListener( new WindowAdapter() {
      public void windowClosing(WindowEvent e){
        System.exit(0);
      }
    });
    LoggingPanel lp=new LoggingPanel(f,"test",null);
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

        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

                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

        String media = args[0];

        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

    public static void main(String [] args) {
  JFrame f = new JFrame("MiniME - Mini Media Editor");
  f.getContentPane().add(new MiniME(args));
  f.setSize(800, 420);
  f.addWindowListener( new WindowAdapter() {
      public void windowClosing(WindowEvent we) {
    System.exit(0);
      }
  } );
  f.setVisible(true);
View Full Code Here

  mixer.addContainerListener(
    new SimpleMixerListener(f));
  f.setJMenuBar(mixer.getMenuBar());
  f.getContentPane().add(mixer);
  f.setResizable(false);
  f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        System.exit(0);
       }
  });
  f.pack();
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.