Friday, 15 February 2013

javafx - Java assign column in Observable list to @fxml column -


I'm looking for advice because I can not create my form and TableView view builder display The data from the ignored list is the model that is designed in ObservableList & lt; ObservableList & gt; is returning, which I want to allocate to the column in the controller of my form (for example, id ) here is my code:

  @ FXML private table column ID; Database database = new database (); Table view tableview = new table view (); TableView.setItems (database.returnData ()); // -> This method is returning to Observablelist id = tableView.getColumns (). Get (0); // -> Error  

and I'm having an error

 error: (35, 44) java: Incompatible type: java.lang.Object did not convert to javafx.scene.control.TableColumn Can you help me to work it? Thanks a lot! 

EDIT: Can I drag the table view in place of the unseen list from the database, it must start in the controller and then drag the FXML column to the call in the table view? If yes, then how to do it? Thx for any help or word you can share You need to link your tables and columns to your FXML definitions, but also create a

which you insert in your table.

  @FXML private table view & lt; Simple FileProperty & gt; Table; @FXML Private Table column & lt; Simple file property, string & gt; SizeCol; Last Personal Supervisory List & lt; Simple FileProperty & gt; TableData = FXCollections.observableArrayList (); // ... table.setItems (tableData);  

No comments:

Post a Comment