Closing JME3 Canvas in a Swing GUI

hi there

i m a bit troubled… in my game-interface i use a Jframe canvas like the tutorial said…

now there is a weird thing about it. if i m closing the jframe, i can still see the Jframe but its squeezed… and i have to kill the java-process … but i want to get rid of the jframe … wnd.dispose(); does this behaviour i explained

System.exit(0); just shut up the simpleApplication canvas (the jframe still there) and squeeze then …

setVisible(false) is working, but its just hiding… not a good option :frowning:

is this a general problem? or did i make a mistake?

i created an where i made up the jframe with the simpleApplication canvas of a and other components.

on the i made a inputmapping (pressing Escape should shut up the window)

to get the instance of i wrote a small method where i get the jframe of

then i wrote for the esc-pressing each of the lines above, with the result i explained…

any1 a hit?



edit : forgot to say : the only proper way to close is to press alt+f4 … but this is just closing the window … which should be the same as jframe.dispose() no?