When i click on the button from bottom panel, top panel need to be redrawn. But redrawing is not happening. It happens only when resizing the applet. Please someone guide me in fixing this issue.TIA.
The above line of code does nothing. You create a panel, but that panel just sits in memory because you didn't add the panel to the frame.
The repaint() will only paint the panel that contains the button. If you also want to repaint a different panel then you probably need to invoke repaint() on the parent panel that contains the two panels. Something like:
The updated code you posted still does nothing. The panel is still not added to the frame. However, you should NOT even be trying to create a new panel.
now i want it to reload based on changes
Then add "setter" methods to change the properties of your panel.
Any leads? You seem to have been ignoring the perfectly good leads which Rob Camick gave you. As for the revised code you posted, all I can see is that you have changed the names of your panel classes. That just makes it harder to figure out your problem, which by the way your last post didn't describe.