Question: JLabels: when I add "too much" text I can't see all of it.
Also, how to break line into a few pieces?
Possible solutions? Answer: The getPreferredSize() method of the JLabel will return you the minimum
size.
The size that required to display the text in full. But you need to choose a
layout
that will not respect those sizes. Not so easy question as well
It was suggested to use Jlist instead of JLabel and disable it with
setEnabled(false). The selection will be disabled and you need to add your lines
as lines to data model of JList.
Probably you need to take care about UI properties of JList (copy fro JLabel) to
make it looking the same...
--
Sergey
******************************************************************
Our older tips: March 22, 2001 - Oktober 21, 2002
read here.
All published and not published on site tips you can find
here
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.