closing dialog with jframe