Rows not displaying TableView Javafx

35 Views Asked by At

I can't seem to get data to show up in a row. This returns an order table which is implemented successfully. The table appears, and if I use literals instead of variables the data shows correctly (ie, instead of orderRows[0] if I put "Boo" it works). I feel like I have something right under my nose that I can't see. As a note, I have confirmed my OrderData class is successfully passing the appropriate string to OrderRows. My row header is showing up properly "Ship Date". The row below is blank. What am I forgetting?

public class viewOrderTable {
  //This is where my orderData is created.
  //I have verified this is putting a correct value in OrderRows.
  static OrderData orderData = new OrderData();
  static OrderRows[] orderRows = orderData.GetOrderRows();
  private final static ObservableList<OrderRows> rowMaker =
  FXCollections.observableArrayList(orderRows[0]);

  public static TableView<OrderRows> viewOrderTableBuilder() {
    TableView<OrderRows> addOrderTable = new TableView();
    TableColumn<OrderRows,String> shipDate = new 
    TableColumn<OrderRows,String> ("Ship Date");
    shipDate.setCellValueFactory(new PropertyValueFactory("shipDate"));
    addOrderTable.setItems(rowMaker);
    addOrderTable.getColumns().addAll(shipDate);
    return addOrderTable;
    }

This is my OrderRows class:

public class OrderRows {
    private String shipDate;


    public OrderRows(String shipDate,) {
        this.shipDate = shipDate;

    }
    public String getshipDate() {
        return shipDate;
    }

}
0

There are 0 best solutions below