Package javax.swing

Examples of javax.swing.JFrame.dispatchEvent()


        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
        menuItem.addActionListener(new AbstractAction() {
      private static final long serialVersionUID = 1L;
            public void actionPerformed(ActionEvent event) {
              JFrame frame = XBayaMenuItem.this.engine.getGUI().getFrame();
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
            }
        });
        return menuItem;
    }
View Full Code Here


        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
        menuItem.addActionListener(new AbstractAction() {
      private static final long serialVersionUID = 1L;
            public void actionPerformed(ActionEvent event) {
              JFrame frame = XBayaMenuItem.this.engine.getGUI().getFrame();
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
            }
        });
        return menuItem;
    }
View Full Code Here

            @Override
            public void actionPerformed(final ActionEvent e) {
                // tell the frame to close itself
                JFrame topFrame = DataStorageApplication.this;
                WindowEvent windowClosing = new WindowEvent(topFrame, WindowEvent.WINDOW_CLOSING);
                topFrame.dispatchEvent(windowClosing);
            }
        });

        JMenuItem aboutMenuItem = new JMenuItem(new AbstractAction(MESSAGES.getString("Action.About")) {
            private static final long serialVersionUID = -7636865485381510269L;
View Full Code Here

            @Override
            public void actionPerformed(final ActionEvent e) {
                // tell the frame to close itself
                JFrame topFrame = DataStorageApplication.this;
                WindowEvent windowClosing = new WindowEvent(topFrame, WindowEvent.WINDOW_CLOSING);
                topFrame.dispatchEvent(windowClosing);
            }
        });

        JMenuItem aboutMenuItem = new JMenuItem(new AbstractAction(MESSAGES.getString("Action.About")) {
            private static final long serialVersionUID = -7636865485381510269L;
View Full Code Here

            @Override
            public void actionPerformed(final ActionEvent e) {
                // tell the frame to close itself
                JFrame topFrame = DataStorageApplication.this;
                WindowEvent windowClosing = new WindowEvent(topFrame, WindowEvent.WINDOW_CLOSING);
                topFrame.dispatchEvent(windowClosing);
            }
        });

        JMenuItem aboutMenuItem = new JMenuItem(new AbstractAction(MESSAGES.getString("Action.About")) {
            private static final long serialVersionUID = -7636865485381510269L;
View Full Code Here

        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
        menuItem.addActionListener(new AbstractAction() {
      private static final long serialVersionUID = 1L;
            public void actionPerformed(ActionEvent event) {
              JFrame frame = XBayaMenuItem.this.engine.getGUI().getFrame();
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
            }
        });
        return menuItem;
    }
View Full Code Here

        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
        menuItem.addActionListener(new AbstractAction() {
      private static final long serialVersionUID = 1L;
            public void actionPerformed(ActionEvent event) {
              JFrame frame = XBayaMenuItem.this.engine.getGUI().getFrame();
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
            }
        });
        return menuItem;
    }
View Full Code Here

    getRootPane().getActionMap().put("Exit", new AbstractAction() {
      @Override
      public void actionPerformed(ActionEvent arg0) {
        // dispatch window closing event
        JFrame frame = ChunkyFrame.this;
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
      }
    });

    minimap = new Minimap(chunky);
    map = new ChunkMap(chunky);
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.