removing components from a JPanel
839609Mar 9 2011 — edited Mar 10 2011Hello,
I'm making a gui with Swing, and would like you tell me what is the best way to remove all the components has added to a JPanel. I have prove with methods like removeAll(), but in some cases it didn't work at all, so I wonder if maybe the best way to remove all the components i't using the same method, but giving as a parameter the object to remove.
I wonder if maybe if you don't have the reference to an object, it's maybe imposible to remove it.
Thank you very much.
Sorry for my english it's not very good.