how to reset a the contents of a JPanel
807601Apr 9 2008 — edited Apr 9 2008I was just wondering the different ways one could go about resetting a JPanel. That is to clear everything then reload it.
AKA a game of chess where the pieces have already been moved...then on the click of a button the pieces go back to their original starting positions.
I've checked the API and fiddled about with hide(), show(), dispose() and re-adding the contents but to no avail. Well one method sort've worked but my algorithms became un-workable.
Just wondering what the best (most efficient perhaps?) way of going about this would be.
Thank you in advance.