Learn how to create interfaces with FXML and JAVAFX, challenge: update an existing fxml file

Welcome to the Challenge. In this challenge, I have provided a skeleton program in your exercise files folder. If you run the program the way it is, you will get output similar to this, FXML Tableview Example, and this is an address book.

Right now, I’m only listing the first name. We wanna add last name and email address. At the bottom, we have fields to enter a first name, a last name and an email, but we’re going to need a little bit more there, as well.

Let’s talk about the objectives of the Challenge. You start by opening up the FXML file. In here, you need to add logic to add the last name and the email to the view. Also, see if you can figure out how to add code to allow the user to sort by name or last name, or even email.

We didn’t review this in the series, but if you look around the internet, you should be able to find some code that will help. Finally, in the FXML file, in the bottom half where we have the horizontal box where the first name, last name and email, add a button to invoke the addPerson method.

Leave a Reply

Notify of