Tooltip using html javafx

Viewed 2474

I want to add a tooltip on a checkbox of javafx. I want to make it using java code. This tooltip text depends on some object properties. My problem is that i want to have some(not all) words bold inside the tooltip. Is there any way to do it? As far as i googled i didn't found a solution or a way to do it using for example html. It would be a charm if i could do something like this:

PaggingTest paggingTest = new PaggingTest();
Tooltip tooltip = new Tooltip(
    "<b>AlgorithmType:</b> " + paggingTest.getAlgorithmType()
    + "<br/><b>Memory Pages:</b> " + paggingTest.getMemoryPages()
    + "<br/><b>Program Pages:</b> " + paggingTest.getProgramPages()
    + "<br/><b>Sample Count:</b> " + paggingTest.getSampleCount()
    + "<br/><b>Distribution Type:</b> " + paggingTest.getDistributionType());

CheckBox checkBox = new CheckBox("Test");
checkBox.setTooltip(tooltip);
testFlowPane.getChildren().add(checkBox);
1 Answers
Related