Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Sedrick Jefferson
Added: Sep 6, 2018 2:18 PM
Views: 3
setCellFactory of JavaFX TableView TableColumn
  1. tcStatus.setCellFactory(column -> {
  2.   return new TableCell<TableType, TableColumnType>() {
  3.       @Override
  4.       protected void updateItem(TableColumnType item, boolean empty) {
  5.           super.updateItem(item, empty);
  6.  
  7.           if (item == null || empty) {
  8.               setText(null);
  9.               setStyle("");
  10.           } else {
  11.               // Format date.
  12.               setText("");
  13.  
  14.           }
  15.       }
  16.   };
  17. });