I have a desktop application project in which I added buttons with functionalities to it. So, they all are contained in a single JPanel, now whenever I push a certain, I have a further data to gather from the user, In that JPanel where the button is located, I have inserted another JPanel where I want my respective fields to be displayed according to the button I pressed in the main JPanel.....
Now, my problem is that I cannot get to display that inner JPanel that I have made separately as a class,
In my main JPanel where my buttons are located I have written an 'actionPerformed' function for that button so that I can add the respective new JPanel...
When I execute the code, and click on the respective button, the inner JPanel(EditProfile) does'nt display itself....Code:
EditProfile editprofile = new EditProfile(); // editprofile is the JPanel I want to add in the main JPanel
this.innerPanel.add(editprofile); // innerpanel is the panel where my respecitve panels that I want to add will be displayed
this.validate(); // this is the Panel where my buttons are located
Can someone help me what I am doing wrong here???
Thanks for the help.