MultiLineLabel in GenericDialog
Posted by
Stephan Preibisch on
May 08, 2014; 5:38pm
URL: http://imagej.273.s1.nabble.com/MultiLineLabel-in-GenericDialog-tp5007637.html
Hi everyone,
I want to use a MultiLineLabel to display text in a GenericDialog. Using a listener I want to change that comment (the MultiLineLabel) depending on a choice in one of the other elements. However, there is no method to set the text of the MultiLineLabel.
Until now, I used a Label, where after adding the message " " to the GenericDialog, I changed the text which then contains "\n"'s before calling showDialog(). This way I got a Label which has multiple lines and a setText() method that I can call from the Listener. I just recently figured out that this works only under Mac, not Windows and Linux. Bummer.
Is there any way to set the text of a MultiLineLabel without using reflections?
Alternatively, I could use multiple normal Labels, but then the distance between them is far too large, it does not look like a block.
If this all doesn't work, I will extend the MultiLineLabel class and add it as my own element. But if there is a more elegant way would be nice.
Thanks a lot,
Stephan
---
Dr. Stephan Preibisch
HFSP Fellow
Robert H. Singer / Eugene Myers lab
Albert Einstein College of Medicine / HHMI Janelia Farm / MPI-CBG
email:
[hidden email] /
[hidden email] /
[hidden email]
web:
http://www.preibisch.net/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html