1

I have a JavaFX interface with some multi-line text labels which are right justified using the usual settings.

What's bothering me is that the right justification is line breaking after a space instead of what I thought would be the normal of breaking at the end of the final character of the first line, which gives it a ragged right edge.

Just checked and I'm not mad, in Excel for example it breaks where I would expect and gives a clean right edge.

So... assuming this is a bug or lack of attention to detail by the JavaFX team, is there anything I can override in Label to fix this problem ??

The first image is the JavaFX version, second Excel.

JavaFX Label right alignment

Excel right alignment

blissweb
  • 3,037
  • 3
  • 22
  • 33
  • Just to understand, you're talking about the Alignment of your text in the 2nd line of your `Label` ? example of text : (**Successful Trades**) ! – Bo Halim Dec 30 '16 at 10:23
  • Can you post code that produces this result? (Presumably you don't actually need a table here: just a label will do.) What do you consider to be the "usual settings" you refer to in your question? – James_D Dec 30 '16 at 15:37
  • To clarify, for example on Successful Trades item, what I want is for the L of Successful to be directly above the S of Trades, like it shows in Excel and every other right justification system. There is no table involved, its just a Label with wrap text set to true and right justified. Currently on all the examples, there is a space character shown at the end of the first line. – blissweb Dec 30 '16 at 21:12
  • 1
    This is indeed interesting. It looks like JavaFX keeps displaying the "space" between the words when wrap is enabled. – ItachiUchiha Dec 30 '16 at 23:48

1 Answers1

1

This bug is already reported as JDK-8145496 and right now is not targeted for any specific release.

It is reported as a P4 priority. Feel free to vote for the issue, if you want to get it fixed with a higher priority.

ItachiUchiha
  • 36,135
  • 10
  • 122
  • 176
  • Thanks for the info, I have opened another question about how to make a patch. http://stackoverflow.com/questions/41405290/patching-a-bug-in-the-jdk-for-an-individual-application I'll leave this one as unanswered for now to see if anyone else has any ideas for a workaround. – blissweb Dec 31 '16 at 03:55