0

I am using an attributed string to bold the heading names, and I would like to print out in a Text object in javafx, but I cannot figure out how. I've looked a fair amount of places online, including the java docs but nothing seems to go over this... Here is what I am trying to do:

AttributedString boldName = new AttributedString("Name: ");
boldName.addAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);

String name = innerNode.name;

Text info = new Text(**boldName.something()?** + name);

The result should be this: Name: name, something quite simple I feel but how??

4

1 に答える 1