How to add small panels to a bigger panel Dynamically
I have a frame which has scroll A and scroll pame B,
scrollpane A has a panel C ( the bigger panel mentioned in the title)
Now I have to add other smaller panels to the to panel C when the user clicks on a JButton A .
i have another JButton B , when user clicks this button the visibility of Scrollpane A and ScrollPane B is alternated.
so My problem is here . if the user were to click Jbutton A four times
4 smaller panels should be added and displayed on panle C but it never gets diplayed i tried repaint () that didnt work. for now what i have done is add two lines o setVsible () code which makes panel C blink, to the jbutton a listener . This is one solution i came up with . I am looking for another
any help is greatly appreciated
thanks in advaced

