Package javax.swing

Examples of javax.swing.JFrame.addWindowListener()


            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


        WindowAdapter windowCloseHandler = new WindowAdapter() {
            public void windowClosing( WindowEvent e ) {
                close();
            }
        };
        frame.addWindowListener( windowCloseHandler );
        return frame;
    }

    public JFrame getControl() {
        return control;
View Full Code Here

      frame.setTitle(getResourceString("Title"));
      frame.setBackground(Color.lightGray);
      frame.setIconImage(new ImageIcon(Resources.getResource(Resources.getString("sunLogo"))).getImage());
      frame.getContentPane().setLayout(new BorderLayout());
      frame.getContentPane().add("Center", this);
      frame.addWindowListener(new AppCloser(this));
      frame.pack();
      frame.setSize(500, 600);
      frame.setVisible(true);
    }
    catch (Throwable t) {
View Full Code Here

        if (e.getClickCount() == 2) {
          // Creates and sets up new window
          final JFrame plotFrame = new JFrame();

          JWatWorkloadManager.addJMTWindow(plotFrame);
          plotFrame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
              JWatWorkloadManager.exit(plotFrame);
            }
View Full Code Here

        if (e.getClickCount() == 2) {
          // Creates and sets up new window
          final JFrame plotFrame = new JFrame();

          JWatWorkloadManager.addJMTWindow(plotFrame);
          plotFrame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
              JWatWorkloadManager.exit(plotFrame);
            }
View Full Code Here

        if (e.getClickCount() == 2) {
          // Creates and sets up new window
          final JFrame plotFrame = new JFrame();

          JWatWorkloadManager.addJMTWindow(plotFrame);
          plotFrame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
              JWatWorkloadManager.exit(plotFrame);
            }
View Full Code Here

              int y = model.getMatrix().getNumVariables() * HEIGHT_TOT;
              if (e.getX() < x && e.getY() < y && e.getX() / WIDTH_TOT != e.getY() / HEIGHT_TOT) {
                final JFrame f = new JFrame();

                JWatWorkloadManager.addJMTWindow(f);
                f.addWindowListener(new WindowAdapter() {
                  @Override
                  public void windowClosing(WindowEvent e) {
                    JWatWorkloadManager.exit(f);
                  }

View Full Code Here

        if (e.getClickCount() == 2) {
          // Creates and sets up new window
          final JFrame plotFrame = new JFrame();

          JWatWorkloadManager.addJMTWindow(plotFrame);
          plotFrame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
              JWatWorkloadManager.exit(plotFrame);
            }
View Full Code Here

            int y = model.getMatrix().getNumVariables() * HEIGHT_TOT;
            if (e.getX() < x && e.getY() < y && e.getX() / WIDTH_TOT != e.getY() / HEIGHT_TOT) {
              final JFrame f = new JFrame();

              JWatWorkloadManager.addJMTWindow(f);
              f.addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e) {
                  JWatWorkloadManager.exit(f);
                }

View Full Code Here

        if (e.getClickCount() == 2) {
          // Creates and sets up new window
          final JFrame plotFrame = new JFrame();

          JWatWorkloadManager.addJMTWindow(plotFrame);
          plotFrame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
              JWatWorkloadManager.exit(plotFrame);
            }
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.