Possible duplicate:
Multi-line hints in Java?
It is very strange. All I want to do is make my tool a multi-liner tooltip. I added the character "\ n" to the string that I am passing in the appropriate places. In fact, I am printing the same line and it has line breaks. However, the tooltip does not work. That's what I'm doing:
@Override public void itemStateChanged(ItemEvent arg0) { if(arg0.getStateChange() == ItemEvent.SELECTED){ String s = arg0.getItem().toString(); for(InfoContainer i: mc.myInfo) if(s.equals(i.getId())){ selector.setToolTipText(i.getInfo()); System.out.println(i.getInfo()); return; } } }
However, the carriage DOES NOT return in the tooltip while the system printout is displayed.
source share