yes it should work if implemented correctly. But why do you need to show the first jframe, close it then show the other?