×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: sumesh tg
Added: Nov 30, 2016 7:14 AM
Views: 6
Tags: cell factory java
  1. class PaymentEditCell extends TableCell<InvoiceBEAN, InvoiceBEAN> {
  2.  
  3.         Button btnEdit = new Button("Edit");
  4.         Button btnDelete = new Button("Delete");
  5.         HBox hboxEdit = new HBox(3);
  6.  
  7.         {
  8.             hboxEdit.getChildren().addAll(btnEdit, btnDelete);
  9.             setGraphic(hboxEdit);
  10.  
  11.         }
  12.  
  13.         @Override
  14.         protected void updateItem(InvoiceBEAN item, boolean empty) {
  15.             super.updateItem(item, empty);
  16.             if (!empty) {
  17.  
  18.             } else {
  19.                 setText(null);
  20.                 setGraphic(null);
  21.             }
  22.         }
  23.     }