Search code examples
javalibgdx

LibGdx removing actor from table, then reorder


Is there a easy way to remove a actor from a table and re order the table? without remaking the table? When I remove a actor from a table it shows a blank space where the actor was

actorInsideTable.addListiner(new ClickListener(){
   @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            actorInsideTable.remove();
        }
});

Solution

  • After calling remove(), call the pack() method from the Table object.