I have already built my system to log in but I am having difficulties in proceeding with the new panel I want to show after log in is successful.
This is how I'm doing it:
I have built different panels for each use case of my app. So I have a panel that says LoginPanel.
I take username and password in correctly, and everything... Now, I want that when username and password are correct the LoginPanel should be removed, and the my JTabbedPane to be added onto the frame.
frame.getContentPane().removeAll(); //frame.getContentPane().add(new MyJTabbedPane()); frame.getContentPane().add(new OneOfMyOtherPanels()); frame.validate();
But this is not working fine. Only part of my OneOfMyOtherPanels is being shown, not its entirety.
Anyone please guide me on how I should be doing this.
UPDATE: Sorry, I test every panel I build independently by building a main method inside each and putting them on separate frames. This panel I was testing has inside its main method code that adds an additional panel to it as well. Naturally, this other panel was not showing inside my LoginPanel's frame.
Anyways, I'd appreciate any input on whether I am doing this correctly or not. Thank you.
Edited 4 Years Ago by bibiki: I just found out why only part of the panel is being shown.