Examples of addWindowListener()


Examples of javax.swing.JFrame.addWindowListener()

    protected static void launchFrame(JComponent content, boolean exitOnClose) {
        JFrame frame = new JFrame("Create VPF Data Layer");

        frame.getContentPane().add(content);
        if (exitOnClose) {
            frame.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
                }
            });
        }
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

            SVGRasterizer svgr = new SVGRasterizer(fileURL);
            svgr.setBackgroundColor(OMColor.clear);
            BufferedImage bi = svgr.createBufferedImage();

            JFrame frame = new JFrame();
            frame.addWindowListener(new WindowAdapter() {
                public void windowClosed(WindowEvent e) {
                    System.exit(0);
                }
            });
            frame.getContentPane().add(new JLabel(new ImageIcon(bi)));
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

        mapBean.add(shapeLayer);

        // Add the map to the frame
        frame.getContentPane().add(mapBean);

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

Examples of javax.swing.JFrame.addWindowListener()

    public static void main(String[] argv) {
        JFrame frame = new JFrame("IconFactoryTestingTool");
        frame.getContentPane().add(new IconFactoryTestingTool().getFace());
        frame.pack();
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                // need a shutdown event to notify other gui beans and
                // then exit.
                System.exit(0);
            }
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

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

      f.addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e){
          new TestBinary(buffer,args[0]);
        }
      });
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

        lr.warning("Start");
      } catch (IOException e) {
        e.printStackTrace();
        System.exit(0);
      }
      f.addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e){
          try {
            buffer.closeServer();
          } catch (IOException e1) {
            e1.printStackTrace();
View Full Code Here

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

Examples of javax.swing.JFrame.addWindowListener()

   * 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

Examples of javax.swing.JFrame.addWindowListener()

     *
     * @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

Examples of javax.swing.JFrame.addWindowListener()

        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
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.