Search in sources :

Example 1 with JmeFormatter

use of com.jme3.util.JmeFormatter in project jmonkeyengine by jMonkeyEngine.

the class TestCanvas method main.

public static void main(String[] args) {
    JmeFormatter formatter = new JmeFormatter();
    Handler consoleHandler = new ConsoleHandler();
    consoleHandler.setFormatter(formatter);
    Logger.getLogger("").removeHandler(Logger.getLogger("").getHandlers()[0]);
    Logger.getLogger("").addHandler(consoleHandler);
    createCanvas(appClass);
    try {
        Thread.sleep(500);
    } catch (InterruptedException ex) {
    }
    SwingUtilities.invokeLater(new Runnable() {

        public void run() {
            JPopupMenu.setDefaultLightWeightPopupEnabled(false);
            createFrame();
            currentPanel.add(canvas, BorderLayout.CENTER);
            frame.pack();
            startApp();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        }
    });
}
Also used : JmeFormatter(com.jme3.util.JmeFormatter) ConsoleHandler(java.util.logging.ConsoleHandler) Handler(java.util.logging.Handler) ConsoleHandler(java.util.logging.ConsoleHandler)

Aggregations

JmeFormatter (com.jme3.util.JmeFormatter)1 ConsoleHandler (java.util.logging.ConsoleHandler)1 Handler (java.util.logging.Handler)1