title: Add a button to a cells in a TableView (JAVAFX)
body: <p>i am trying to add an edit Button to my table. 
  when i click the button it will open a window with the item selected,I tried several approaches to add the button but no one works for me.
  thank you 
  here is the code of my controller:</p>
  
  <pre><code>public class AmdinConsolcontroler implements Initializable{
  
  
  
  @FXML
  // here we add the create new user window the the event butto
  private void ActionCreateNewUser (ActionEvent evt)
  {
      try {
    Parent root =     FXMLLoader.load(SimpleFXapp.class.getResource("/Views/CreateUser.fxml"));
    Stage primaryStage = new Stage();
    Scene Scene = new Scene(root);
    primaryStage.setScene(Scene);
    primaryStage.setTitle("Create");
    primaryStage.show();
        }
    catch(Exception Err)
    {
     System.out.println("exception from create user");
    }
  }
  
        // Creating the Observable list to be data for the table  
       ObservableList&lt;Users&gt; data1 =     FXCollections.observableList(Users.GetShortedUsrs());
      // Declaring the Table 
     @FXML
      TableView&lt;Users&gt; ShortedUserList;
     //Declaring the Columns of the atble  
     @FXML
     TableColumn&lt;Users, String&gt; ColFirstname ;
     @FXML 
     TableColumn&lt;Users, String&gt;LastName;
     @FXML 
     TableColumn&lt;Users, String&gt;UserName;
    @FXML 
    TableColumn&lt;Users, String&gt;Role;
   @FXML 
   TableColumn&lt;Users, String&gt;IsActive;
   @FXML 
   TableColumn&lt;Users, String&gt;LastLogin;
  @FXML
  TableColumn Edit = new TableColumn&lt;&gt;("Edit");
  
  
  // Addin the edit button 
  
  
  
  
  @Override
  public void initialize(URL url, ResourceBundle rb) 
  {
      try{
          // initialzing the table column
          ColFirstname.setCellValueFactory(new PropertyValueFactory("UserName"));
          LastName.setCellValueFactory(new PropertyValueFactory("UserLastname"));
          UserName.setCellValueFactory(new PropertyValueFactory("LoginId"));
          Role.setCellValueFactory(new PropertyValueFactory("UserRole"));
          IsActive.setCellValueFactory(new PropertyValueFactory("IsActive"));
          LastLogin.setCellValueFactory(new PropertyValueFactory("LastLogin"));
         // Adding the edit Button to the 
  
  
  
         // setng data  the table         
          ShortedUserList.setItems(data1);
         }
    catch(Exception Err)
        { 
            System.out.println(Err.getMessage());
          }
  
  
  
  
  
  
  
  
  
  
  }  
  
  
  
  
  }
  </code></pre>