• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Whats a good way of resizing a String so it fits the Scene?

 
Bernard Rosseel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a txt-file which contains a very long String,which is put into a Label. This label's width exceeds the width property of the Scene and Stage on which it is mounted however.
So a scrolling bar appears at the bottom of the Stage so I can see the end of the String.
This is quite unhandy ofcourse and it would be better if all the text is automatically constrained to the size of the Scene/Stage.

Ive looked intothe official documentation but without much succes.
 
Bernard Rosseel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a partly solution.
nodeObject.setWrapText(true);

This made it wrap stuff up but just not enough. It still is bigger than the Stage.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic