Answers for "how to change font javafx"

1

how to change font in javafx

t.setText("This is a text sample");
t.setFont(Font.font ("Verdana", 20));
t.setFill(Color.RED);
Posted by: Guest on December-19-2020
1

Custom Font JavaFX

@font-face {
    font-family: 'Fleftex';
    src: url('fonts/Fleftex_M.ttf');
}

.label {
    -fx-font-family: 'Fleftex';
    -fx-font-size: 20;
}

.button .text {
    -fx-font-family: 'Fleftex';
}
Posted by: Guest on September-01-2021
0

javafx change text size

text.setFont(Font.font ("arial", 24));
or
text.setStyle("-fx-font: 24 arial;");
Posted by: Guest on November-15-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language