JTree - problems with names of elements
I have a Jtree thats populated with expandable elements. These elements are loaded on startup, but some of the elements don't get their full names, just i.e "dem..." instead of "demo3". WHen I expand the node, the full name appears, and remains.
Anyone know what this could be?
The problem is really often associated with nodes with names containing "m" ..
By default the tree node renderer is JLabel.
It look like you are not using pack() or validate().
It depend also the layout manager you are using.
In one word, it seems the JLabel has dimension too short.
Can only show 3 to 4 char. that is why "demo3" show as "dem..."
Try have some node name like "WWWWW", if you see "WW..." or "WWW..."
Then that is the problem. ( Not as you thought: only "m" has problem )