diablotheboss

Display

Jan 24th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1.  ObservableList<ArrayList<Double> > dataObs;
  2.         dataObs = FXCollections.observableArrayList();
  3.         // lenPet, lenSet... are TableColumn and tableDataset is the TableView
  4.         lenPet.setCellValueFactory(param -> new ReadOnlyObjectWrapper<Double>(param.getValue().get(0)));          lenSet.setCellValueFactory(param -> new ReadOnlyObjectWrapper<Double>(param.getValue().get(1)));
  5.         larPet.setCellValueFactory(param -> new ReadOnlyObjectWrapper<Double>(param.getValue().get(2)));
  6.         larSet.setCellValueFactory(param -> new ReadOnlyObjectWrapper<Double>(param.getValue().get(3)));
  7.        
  8.         for (int i=0;i<dataset.getnRecord(); i++)
  9.         {
  10.             dataObs.add(dataset.getRecord(i));
  11.         }
  12.         tableDataset.setItems(dataObs);
Advertisement
Add Comment
Please, Sign In to add comment