posted 16 years ago
Dear Friends:
I have a project that has following requirements,
When I click the "Group" button, I can add a JPanel to the current component,when I keep clicking the "Group" button, I can add a series of JPanels to the current component layer by layer, for example, after I click "group" button 5 time, "Label 1" has 5 layers of JPanels totally, It looks good to me,
but I need to undo what I did before, so When I click "ungroup" button, I hope to take off each JPanel by each clicking, If I keep clicking "ungroup" button 5 times, I hope to have only ONE "Label 1" dispaly in the Main Panel.
So far My situation is that I can only take off last layer of JPanel, and I cannot go ahead to the inner most part, ie "Label 1".
I know it is a Do-and-Undo problem, but I am not sure I am on the right track or not, please advice how to solve this??
Thanks