Back to course

Working with Labels

JavaFX 0 to Hero

Working with Labels

Labels are used to display text that the user cannot edit. You can style them with fonts and colors.

java Label label = new Label("Username:"); label.setFont(new Font("Arial", 20)); label.setTextFill(Color.web("#0076a3"));