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.

thanx stultuski your reply solved my problem.

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.