0

I'm developing an application for creating quizzes. A quiz have more questions. A question look like this:

  <p>How are you<p>
  <b>How old are you</b>
  What is your name?

You see that I've used html tags. How can I format a question? If the question is between <b>'s, the font must be bold. If the font-family is "Arial", the font from the UI must be "Arial".

adrianbanks
  • 81,306
  • 22
  • 176
  • 206
John Smith
  • 1,276
  • 4
  • 17
  • 35
  • you can provide a css to format it, similar to this question http://stackoverflow.com/questions/10147325/set-font-in-javafx/10149050#10149050 – AurA Apr 03 '13 at 11:28

1 Answers1

0

Display your questions in a WebView and use html and html compatible css to markup the content.


If you don't have to use html for markup, you could instead:

Place multiple Text objects in a FlowPane and style them with JavaFX css.

OR

In Java 8+, use the TextFlow control.

jewelsea
  • 150,031
  • 14
  • 366
  • 406