JME3 Canvas in a Swing GUI, not refreshed if use menus

Hi,

I use in my app. the JME3 engine in a swing GUI. I have a problem, and I can’t figure out how to solve it. When I start my app., play a bit with the camera, and after that I use some of the menus (JMenuItem), when I close the windows that created the menu on which I pushed, the panel on which the canvas is is not refreshed, it is freezed with the image that was there before using the swing menus. The solution is that the user must click on the panel so it to be refreshed. I tried to do panel.transferFocus and many other things, but nothing seems to work.



How to solve this, so after the user uses the swing menus and closes them, the panel to be refreshed with the scene displayed on it?



Thank you!

Probably app.setPauseOnLostFocus(false) is what you’re looking for