+ 2

How can i log out from one jframe and close all the other jframes but be taken back to the log in page?

I have used system.exit() but it didn't work .setVisible(false) method also didn't work Dispose () also didn't work

15th Aug 2021, 8:11 PM
John
John - avatar
1 Resposta
0
Don't just say, "didn't work". That's not detailed enough. Say what happened and how that is different from what you expected or hoped to happen. If you have a bunch of frames open and 1 of them is your login frame, setVisible on all the frames you don't want should work. It should hide the other frames and leave only the one you care about. If any of them are still visible, you probably did something wrong and didn't really call setVisible(false) on the frames you still see. Avoid confusing "page" with "jframe". If you're using JFrame class, setVisible..., you must have a javax.swing-based user interface. If you're using "pages" or web pages, you must have a web application which won't have any swing components.
18th Aug 2021, 4:49 PM
Josh Greig
Josh Greig - avatar