I am using the answer to this question in order to word-wrap my JLabel
's text and the code I am using to do that is this:
label.setText("<html style=\"vertical-align:middle;\">"+label.getText()+"</html>");
But the label displays the text wrong. For example if the label's text was "the big bad wolf" what I see is this:
<html style="vertical-align:middle;">the big bad wolf</html>
Why is the label not accepting my style?
UPDATE: Here is an example of what I am trying to do: