I am creating a combo box with options "Checking","Savings","Credit Card". When the user selects "Checking" option, it should directly go to "CheckingJPanel".
I am using card layout.
I am creating a combo box with options "Checking","Savings","Credit Card". When the user selects "Checking" option, it should directly go to "CheckingJPanel".
I am using card layout.
Use a CardLayout
. It allows you to swap panels in the same place on the frame.
Read the section from the Swing tutorial on How to Use a CardLayout for a working example that does exactly what you want.