July 2017
Intermediate to advanced
466 pages
11h 24m
English
If the item has an image, we handle it in the same way that we did with the network icon image. This time, though, we actually wrap the ImageView in another HBox before adding it to the outer HBox. We do that so that we can add padding around the image (via picture.setPadding(new Insets()) to give this image some space between it and the network icon.
Finally, we create a Label to hold the item's body. We set the font size of the text to 20 points via label.setFont(Font.font(null, 20)), and add it to our HBox, which we then return to the caller, updateItem().
Read now
Unlock full access