title: How to add two buttons in a TableColumn of TableView JavaFX
body: <p>I want to add two button in action TableColumn, i already read this <a href="https://stackoverflow.com/questions/29489366/how-to-add-button-in-javafx-table-view">How to add button in JavaFX table view</a> and this <a href="https://stackoverflow.com/questions/31139260/add-a-button-to-a-cells-in-a-tableview-javafx">Add a button to a cells in a TableView (JAVAFX)</a> but both of them use one button in <code>setGraphic</code>, so when i try to use :</p>
  
  <pre><code>actionFld.setCellFactory(param -&gt; new TableCell&lt;Patient, Patient&gt;() {
      private final JFXButton editButton = new JFXButton("edit");
      private final JFXButton deleteButton = new JFXButton("delete");
  
      @Override
      protected void updateItem(Patient patient, boolean empty) {
          super.updateItem(patient, empty);
  
          if (patient == null) {
              setGraphic(null);
              return;
          }
  
          deleteButton.setOnAction(event -&gt; {
              Patient getPatient = getTableView().getItems().get(getIndex());
              System.out.println(getPatient.getNom() + "   " + getPatient.getPrenom());
          });
  
          editButton.setOnAction(event -&gt; {
              Patient getPatient = getTableView().getItems().get(getIndex());
              System.out.println(getPatient.getNom() + "   " + getPatient.getPrenom());
          });
  
          setGraphic(deleteButton);//&lt;&lt;&lt;---------------add button 1
          setGraphic(editButton);//&lt;&lt;------------------add button 2
      }
  });
  </code></pre>
  
  <p>it show me just one button :</p>
  
  <p><a href="https://i.stack.imgur.com/VIZOc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VIZOc.png" alt="just one button"></a></p>
  
  <p>How can i solve this problem?</p>