Settings Panel wont go away (1 post)

  • Profile picture of elginlee elginlee said 3 months, 3 weeks ago:

    Hi, I recently put my Simpleapplication into a canvas and then into a frame. All works smoothly, only for one thing: the settings panel (the one with the JME3 logo) still pops up even though i am using frames now.

    So how do I get rid of that? I tried .setShowSettings(false) already.

    public static void main(String[] args) throws InterruptedException {
    AppSettings settings = new AppSettings(true);
    settings.setWidth(1362);
    settings.setHeight(748);
    Mouse.setClipMouseCoordinatesToWindow(true);
    Thread.sleep(3000);
    Mouse.setClipMouseCoordinatesToWindow(true);
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.setSize(settings.getWidth(), settings.getHeight());
    frame.pack();
    final TestWalkingChar app = new TestWalkingChar(frame);
    app.setPauseOnLostFocus(false);
    app.setSettings(settings);
    app.createCanvas();
    app.startCanvas(false);
    app.setShowSettings(false);
    JmeCanvasContext context = (JmeCanvasContext) app.getContext();
    frame.setVisible(true);
    TestWalkingChar hf =new TestWalkingChar(frame);
    hf.setShowSettings(false);
    hf.makecanvas();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    app.stop();
    frame.getContentPane().removeAll();
    frame.dispose();
    }
    });
    JPanel panel = new LoginPanel(frame,new TestWalkingChar(frame).canvas);
    frame.getContentPane().add(hf.canvas);
    frame.setSize(1366, 768);
    //this.setJMenuBar(getJJMenuBar());
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }