Package javax.swing

Examples of javax.swing.JFrame.addWindowListener()


                        newLocation.x = Math.min(newLocation.x,
                                screenSize.width - size.width);
                        newLocation.y = Math.min(newLocation.y,
                                screenSize.height - size.height);
                        frame.setLocation(newLocation);
                        frame.addWindowListener(this);

                        String titleString = null;
                        if (titleValue.equals("")) {
                            URI uri = URIAttribute.getModelURI(newModel);
                            if (uri != null) {
View Full Code Here


            public void run() {
                try {
                    final PlotLiveDemo plotLiveDemo = new PlotLiveDemo();

                    JFrame frame = new JFrame("PlotLiveDemo");
                    frame.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent event) {
                            plotLiveDemo.stop();
                            System.exit(0);
                        }
                    });
View Full Code Here

        JFrame frame = tableau.getFrame();

        String tableauName = tableau.getFullName();

        frame.setName(tableauName);
        frame.addWindowListener(new WindowAdapter() {
            /* (non-Javadoc)
             * @see java.awt.event.WindowAdapter#windowClosed(java.awt.event.WindowEvent)
             */
            public void windowClosed(WindowEvent e) {
                removeEmptyTabs();
View Full Code Here

            .getImage());
        frame.setTitle(MESSAGES.getString("GumTreeExplorerApplication"));

        frame.setContentPane(contentPane);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.addWindowListener(new WindowAdapter() {
          @Override
          public void windowClosing(WindowEvent e) {
            contentPane.exit();
          }
        });
View Full Code Here

          f.start();
         
          frame.getContentPane().add(f, BorderLayout.CENTER);
          frame.setSize(640, 480);
          frame.setTitle(f.getClass().getName());
          frame.addWindowListener(new WindowAdapter() {
              public void windowClosing(WindowEvent e) {
                  System.exit(0);
              }
          });
          frame.setVisible(true);
View Full Code Here

   
    frame.getContentPane().add(f, BorderLayout.CENTER);
    frame.setSize(640, 480);
    frame.setTitle(" Example");
    frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);
        }
    });
    frame.setVisible(true);
View Full Code Here

        f.setSymbolFileName("BL_MachineStatus.png");
        f.start();
        frame.getContentPane().add(f, BorderLayout.CENTER);
        frame.setSize(640, 480);
        frame.setTitle("MachineStatus Example ");
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        frame.setVisible(true);
View Full Code Here

        StateDiaryButton f = new StateDiaryButton();
    
        frame.getContentPane().add(f, BorderLayout.CENTER);
        frame.setSize(640, 480);
        frame.setTitle(f.getClass().getName());
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        f.setDeviceName("sys/database/dbds1");
View Full Code Here

          f.start();
         
          frame.getContentPane().add(f, BorderLayout.CENTER);
          frame.setSize(640, 480);
          frame.setTitle(f.getClass().getName());
          frame.addWindowListener(new WindowAdapter() {
              public void windowClosing(WindowEvent e) {
                  System.exit(0);
              }
          });
          frame.setVisible(true);
View Full Code Here

        f.setDeviceName("test/scienta/1");
        f.start();
        frame.getContentPane().add(f, BorderLayout.CENTER);
        frame.setSize(640, 480);
        frame.setTitle("SCIENTA Example ");
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        frame.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.