How to remove itself from parent

Hi guys!

I have a Table with a generated column, what is returning a BUTTON.

At the button click I do some things and I want to KILL the button.

I already tried this:

  • btn.setParent(null); // not work
  • btn.deatch(); // not work

As workaround i’m using :

btn.setVisible(false);

Try this:

((ComponentContainer)yourComponent.getParent()).removeComponent(yourComponent);