JavaFX Scene Builder Tutorial 39 - TableView and TableColumn

preview_player
Показать описание
JavaFX Scene Builder Tutorial 39 TableView and TableColumn

The Table View control will be used to display the list of issues.
1 - In the Controls section of the Library panel, select Table View. Drag and drop it above the Split Pane (Vertical Flow) element's divider line
2- From the Menu bar, choose Modify and then Fit to Parent.

3 - Click the Code section of the Inspector panel and select table from the fx:id field's drop-down list of available instance variables.

4 - Set the properties of the two columns in the table view.

In the Hierarchy panel, select the row for the first TableColumn component under the row for the TableView component. In the Code section of the Inspector panel, select colName from the fx:id field's drop-down list.

Click the tab for the Properties section and set the Text property to Name:.

Back in the Hierarchy panel, select the row for the second Table Column component. In the Code section of the Inspector panel, select colStatus from the fx:id field's drop-down list.

Click the tab for the Properties section again and set the Text property to Status.

5 - Add another column to the table.

Select the Table Column control from the Library panel. Drag and drop it inside the table view in the Content panel. The new column is added to the right of the Status tab.

In the Code section of the Inspector panel, select colSynopsis from the fx:id field's drop-down list of available instance variables.

Click the tab for the Properties section again and set the Text property to Synopsis

6 - From the Menu bar, choose View and then Show Sample Data. Notice that the list view and the table view elements in the Content panel are populated with sample data. Choose View and then Hide Sample Data from the Menu bar to turn off the display of the sample data.
Рекомендации по теме
Комментарии
Автор

thank you so much for this tutorial!! it was very helpful and I learned cool tricks like using the sample controller skeleton made by Scene Builder. Thank you!!!

rahmaidayathulla
Автор

I was very impressed with the way you work, please go ahead

mydream
Автор

following along @09:00 my editor does not like me passing parameters for TableColumn. it says does not have type parameters".. why is this working in the video, but my editor and javac seeing this differently?

coryanders
Автор

thank you for your video. Sound would help better 2 understand, specially 4 people who are newbies :D

jensanders
Автор

how can we add form data to tableview ?

jagritisify
Автор

how to export the tableview to csv or excel ?

SubZeero
Автор

i got a TableView of only one column
i followed all the steps in your tutorial but my table doesn't show the data

katt
Автор

Not good, video doesn't have sound, you didn't explane anything.

nikitawhite
join shbcf.ru