code: @Override
      public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column) {
          // Save the supplied value to the DateTimePicker.
          setCellEditorValue(value);
          // Draw the appropriate background colors to indicate a selected or unselected state.
          if (isSelected) {
              if (matchTableSelectionBackgroundColor) {
                  Color selectionBackground = table.getSelectionBackground();
                  dateTimePicker.setBackground(selectionBackground);
                  dateTimePicker.datePicker.setBackground(selectionBackground);
                  dateTimePicker.timePicker.setBackground(selectionBackground);
                  dateTimePicker.datePicker.getComponentDateTextField().setBackground(selectionBackground);
                  dateTimePicker.timePicker.getComponentTimeTextField().setBackground(selectionBackground);
              } else {
                  dateTimePicker.datePicker.zDrawTextFieldIndicators();
                  dateTimePicker.timePicker.zDrawTextFieldIndicators();
              }
          }
          if (!isSelected) {
              if (matchTableBackgroundColor) {
                  Color tableBackground = table.getBackground();
                  dateTimePicker.setBackground(tableBackground);
                  dateTimePicker.datePicker.setBackground(tableBackground);
                  dateTimePicker.timePicker.setBackground(tableBackground);
                  dateTimePicker.datePicker.getComponentDateTextField().setBackground(tableBackground);
                  dateTimePicker.timePicker.getComponentTimeTextField().setBackground(tableBackground);
              } else {
                  dateTimePicker.datePicker.zDrawTextFieldIndicators();
                  dateTimePicker.timePicker.zDrawTextFieldIndicators();
              }
          }
          // Draw the appropriate borders to indicate a focused or unfocused state.
          if (hasFocus) {
              dateTimePicker.setBorder(borderFocusedCell);
          } else {
              dateTimePicker.setBorder(borderUnfocusedCell);
          }
          // If needed, adjust the minimum row height for the table.
          zAdjustTableRowHeightIfNeeded(table);
          // This fixes a bug where the picker text could "move around" during a table resize event.
          dateTimePicker.datePicker.getComponentDateTextField().setScrollOffset(0);
          dateTimePicker.timePicker.getComponentTimeTextField().setScrollOffset(0);
          // Return the DateTimePicker component.
          return dateTimePicker;
      }
docs: getTableCellRendererComponent, Returns the renderer that is used for drawing the cell. This
  is required by the TableCellRenderer interface.
  
  For additional details, see the Javadocs for the function:
  TableCellRenderer.getTableCellRendererComponent().