Examples of addWindowListener()


Examples of javax.swing.JFrame.addWindowListener()

    } // main

    public static void makeFrame() {
        // Set up a GUI framework
        JFrame frame = new JFrame("DOM Echo");
        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[] args) {

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JFrame frame = new JFrame();
                frame.addWindowListener(new WindowAdapter() {
                    @Override
                    public void windowClosing(WindowEvent e) {
                        DBBrowserConfig.saveWindowSize("main", e.getWindow());
                       
                        e.getWindow().setVisible(false);
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

    JFrame frame = new JFrame();
    final JEvent je = new JEvent(frame);

    frame.setTitle("Events: *");
    frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
          je.close();
        }
      });
    frame.getContentPane().add(je);
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

    }

    static void showTree(Template t) {
        JTree tree = new JTree(t.getRootTreeNode());
        JFrame jf = new JFrame(t.getName());
        jf.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        JScrollPane scrollPane = new JScrollPane(tree);
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

      frame.setSize(600, 400);
      frame.setLocation(100, 100);
      frame.getContentPane().add(new UninstallDialog());
      frame.setVisible(true);

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

Examples of javax.swing.JFrame.addWindowListener()

      frame.setSize(600, 400);
      frame.setLocation(100, 100);
      frame.getContentPane().add(new WSForm());
      frame.setVisible(true);

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

Examples of javax.swing.JFrame.addWindowListener()

      frame.setSize(600, 400);
      frame.setLocation(100, 100);
      frame.getContentPane().add(new ReloadConsoleDialog());
      frame.setVisible(true);

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

Examples of javax.swing.JInternalFrame.addWindowListener()

        // Add the panel as a standalone window.
        // This window has its own button on the task bar.
        //
        final JFrame frame = new JFrame(title);
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        frame.addWindowListener(listener);
        frame.getContentPane().add(panel);
        frame.pack();
        return frame;
    }
View Full Code Here

Examples of javax.swing.JWindow.addWindowListener()

            @Override
            public void display(Component c) {
                popup.add(c);
            }
        });
        popup.addWindowListener(new WindowAdapter() {

            @Override
            public void windowOpened(WindowEvent e) {
                setInitialDisplayState();
            }
View Full Code Here

Examples of net.sf.egphilippovoss.util.swing.CFrame.addWindowListener()

            }
        };
        f.getContentPane().setLayout(new BorderLayout());
        f.getContentPane().add(c);
        f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        f.addWindowListener(windowListener);
        f.setVisible(true);
    }
    private JTextField createTextField(final String humanField){
        final JTextField field=new JTextField(getStringViaReflection(humanField));
        field.getDocument().addDocumentListener(new DocumentListener() {
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.