Hello! I am using nebeans ide. I have made two jframes in my project, jframe1 and jframe2. One for login information and one for admin page. My project ran succesfuly i.e when i enter correct information on login page then admin page is displayed. But one problem is that after displaying admin page, login page should disappear but in my case login page(i.e jframe1) also remained open alon with admin page. What code should i add to hide or exit login page only(i.e jframe1)?

this.dispose();
right after the code to open and show the second JFrame should do the trick.

can you mark the thread as 'solved', then?

PS: "I am using nebeans ide." You do not need to tell us what IDE you are using, it is code that matters...