Package javax.swing

Examples of javax.swing.JFrame.addWindowListener()


        frame.getContentPane().add(options.getProperty("layout." + name), c);
    }

    if (!personalJava) {

      frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent evt) {
          setup.broadcast(new SocketRequest());
          frame.setVisible(false);
          frame.dispose();
          System.exit(0);
View Full Code Here


    close.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        frame.setVisible(false);
      }
    });
    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        frame.setVisible(false);
      }
    });
    frame.getContentPane().add(BorderLayout.SOUTH, close);
View Full Code Here

      tabbedPane.addTab("Output", new JScrollPane(textA));
      updateComponentTabs(name, tabbedPane);
      m_framedOutputMap.put(name, tabbedPane);
     
      final JFrame jf = new JFrame(name);
      jf.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
          m_framedOutputMap.remove(jf.getTitle());
          jf.dispose();
        }
      });
View Full Code Here

                        newPlot2DPanel[ni][mi] = new jPlot();
                }
            
                String figTitle = "jFigure "+(currentPlotId+1);
                JFrame currentFrame = new JFrame(figTitle);
                currentFrame.addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e) {
                    jclose(currentFigId);
                }
         });
View Full Code Here

        tray.remove(trayIcon);
      }
    };
    openItem.addActionListener(openListener);
   
    frm.addWindowListener(new WindowAdapter() {
      @Override
      public void windowIconified(WindowEvent e) {

        try {
          tray.add(trayIcon);
View Full Code Here

    Image icon= loadFrameIcon();
    if (icon != null)
      frame.setIconImage(icon);
    frame.getContentPane().setLayout(new BorderLayout(0, 0));

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

        frame.setTitle( "Syncrepl consumer UI" );

        frame.getContentPane().add( serverPanel, BorderLayout.NORTH );
        frame.getContentPane().add( entryInjector, BorderLayout.SOUTH );
       
        frame.addWindowListener( new WindowAdapter()
        {
            @Override
            public void windowClosed( WindowEvent e )
            {
                stop();
View Full Code Here

                server.start();

                // Open a window to provide an easy way to stop the server.
                JFrame frame = new JFrame("Chat Server");
                frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                frame.addWindowListener(new WindowAdapter() {
                        public void windowClosed (WindowEvent evt) {
                                server.stop();
                        }
                });
                frame.getContentPane().add(new JLabel("Close to stop the chat server."));
View Full Code Here

        mainWindow = frame; //for when a Mac user selects "Quit" from the application menu
        frame.setTitle(messages.getString("title", EvolutionChamber.VERSION));
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().add(new EcSwingX(frame));
       
        frame.addWindowListener(new WindowAdapter() {       
          @Override
          public void windowClosing(WindowEvent windowevent) {
            // save the window settings on exit
            int currentExtendedState = frame.getExtendedState();
           
View Full Code Here

    tt.m_nssTokenPath = new String(argv[1]);
    tt.connectSO(null);
   
    /* Set up a GUI framework */
    JFrame myFrame = new JFrame("XML Security Components Tester");
    myFrame.addWindowListener(
      new WindowAdapter() {
        public void windowClosing(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.