|Use Size-As-Needed for layouting WrappingLabels instead of Grab-whole-width [message #1239300]
||Mon, 03 February 2014 22:09
| Erik Schondorff
Registered: October 2013
I'm getting crazy with the WrappingLabels and its layouting logic. Like the title it says, I need just the size (getPreferredSize) for the WrappingLabel as the text needs space. But the WrappingLabels grabs the whole width of the given hints.
Exists a nice solution to handle with this Problem?
Thanks for your help.
Found it out...
WrappingLabel.getPreferredSize(int wHint, int hHint) takes the whole width of given space.
WrappingLabel.getPreferredSize() takes just the needed width....
But I don't know, why...
[Updated on: Mon, 03 February 2014 22:21]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02900 seconds