Package java.awt

Examples of java.awt.Canvas.requestFocusInWindow()


     */
    public static void ensureKeyFocusInMainWindow() {
        SwingUtilities.invokeLater(new Runnable () {
            public void run () {               
                Canvas canvas = JmeClientMain.getFrame().getCanvas();
                if (!canvas.requestFocusInWindow()) {
                    logger.info("Focus request for main canvas rejected.");
                }
            }
        });
    }
View Full Code Here


            inputManager.addKeyMouseFocus(inputManager.getGlobalFocusEntity());

            // Make sure the main canvas gets keyboard focus
            updateKeyFocus(false);
            Canvas canvas = JmeClientMain.getFrame().getCanvas();
            if (!canvas.requestFocusInWindow()) {
                logger.info("Focus request for main canvas rejected.");
            }
        }
    }
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.