I'm trying to bold some text in a setter, but when it's displayed, it's not working. I'll just jump into some code so it makes sense...
private static class Spell {
private final String name;
private final String school;
private final String display_class;
//etc.
.
Text t = new Text("TEST: ");
t.setStyle("-fx-font-weight: bold;");
this.name = name + "\n\n";
this.school = school + "\n";
this.display_class = t + display_class + " " + spell_level + "\n";
//etc.
Displaying the list:
if (!newValue.isHeader()) {
tooltip.setText(newValue.getName() + newValue.getSchool() + newValue.getDisplay_Class() //etc.
The text is displayed within a ScrollPane
as a Text object: Text tooltip = new Text();
The list displays values like Level: 0
Range: 25ft
etc. With this setup, is it at all possible to make just the "Level:"
and "Range:"
parts bold? Currently, what is displayed when it prints t
is Text[text="TEST: ",x=0.0,y=0.0, alignment=LEFT, origin=BASELINE, boundsType=LOGICAL
...etc. etc, yet when adding t
to a pane and displaying it that way, it shows up correctly bolded. I don't know what to do at this point.