2

I would like produce the following table using fxml: enter image description here

So, I wonder how can I nest the columns Primary and Secondary inside Email Address?

lmiguelvargasf
  • 63,191
  • 45
  • 217
  • 228

1 Answers1

4

After checking some code in this link, I was able to figure it out.

<TableView fx:id="tableView" GridPane.columnIndex="0" GridPane.rowIndex="1">
    <columns>
        <TableColumn fx:id="firstNameColumn" text="First Name" prefWidth="100"/>
        <TableColumn text="Last Name" prefWidth="100"/>
        <TableColumn text="Email Address" prefWidth="300">
            <columns>
                <TableColumn text ="Primary" prefWidth="150"/>
                <TableColumn text ="Secondary" prefWidth="150"/>
            </columns>
        </TableColumn>
    </columns>
</TableView>
lmiguelvargasf
  • 63,191
  • 45
  • 217
  • 228