title: Libgdx remove and add image from cells
body: <p>I have this table:</p>
  
  <pre><code>table.add(image1).size(image1.getWidth(), image1.getHeight());
  table.add().size(image1.getWidth(), image1.getHeight()).row();
  table.add().size(image1.getWidth(), image1.getHeight());
  table.add().size(image1.getWidth(), image1.getHeight());
  </code></pre>
  
  <p>I want, when I clicked on empty cell, image deleted from cell and add to the clicked cell. For example when I clicked on third cell, remove image1 from first cell and add it to the third cell. How can do it?</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>I wrote this code but when I click on cell1, image1 is not added on table and added on right screen and click on cell0 don't work.</p>
  
  <pre><code>Group group = new Group();
      group.addActor(image1);
      group.addActor(image2);
      group.addActor(image3);
      root.add(group).size(16, 16);
      root.add(image4).size(image4.getWidth(), image3.getHeight()).row();
      root.add(image5).size(image5.getWidth(), image4.getHeight());
      root.add(image6).size(image6.getWidth(), image5.getHeight());
  
      stage.addActor(root);
      stage.setDebugAll(true);
  
      root.getChildren().get(1).addListener(new InputListener(){
          @Override
          public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
              root.getCells().get(1).clearActor();
              root.getCells().get(0).clearActor();
              root.getCells().get(0).setActor(image1);
              group.clear();
              group.addActor(image4);
              group.addActor(image2);
              group.addActor(image3);
              root.getCells().get(1).setActor(group);
              return true;
          }
      });
  
      root.getChildren().get(0).addListener(new InputListener(){
          @Override
          public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
              root.getCells().get(0).clearActor();
              root.getCells().get(1).clearActor();
              root.getCells().get(1).setActor(image4);
              group.clear();
              group.addActor(image1);
              group.addActor(image2);
              group.addActor(image3);
              root.getCells().get(0).setActor(group);
              return true;
          }
      });
  </code></pre>