Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Fx : strange behaviour when trying to write a Label vertically

Xavier G.Feb 10 2014 — edited Feb 13 2014

I have noticed a strange behaviour concerning rotated texts (Label,...) in JavaFx... 

Originally, I just wanted to be able to display Labels vertically in a GridPane. The first problem is that there is no simple way to tell a Label to display its content in a given direction/orientation. It would be nice to have something like the Side property of the tabPane which would allow to easily turn the text around...

Anyway, I then resigned myself to use the Rotate function to turn my Label. That is when the strange thing began to occur...I am putting my Label in a grid cell which would not be large enough to display the full text if it is not rotated but the text should be able to fit once rotated. The problem is that the text appears wrapped even when it is rotated as if the wrapping test were done before the text is actually rotated... The problem can be seen on this screenshot http://hpics.li/e210f2f : the text that should be displayed is written in the Tooltip and we can see that only the first letter of the rotated text is displayed in the cell grid even though there is more than enough space to display it all...

Anyone has any idea on how to solve that ? Is it the intended behaviour or is it just a little bug ?

Thanks in advance for your answers.

This post has been answered by James_D on Feb 10 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2014
Added on Feb 10 2014
5 comments
3,714 views