Hi all, I want to render multiline data in each cell of the JList. How can this be done. I made use of JLabel rendered in the List by automatic wrapping does not take place.The List is in a scrollpane and this frame is resizable.
Try with html tags < p > or < br > when you want to add a carriage return. This may be enough. Otherwise, you will have to define your own cell renderer for the list. W. [This message has been edited by Wilfried LAURENT (edited October 11, 2001).]
Joined: Jul 26, 2001
I have used a JLabel with HTML tag. in the List. But wrapping does not take place. It is not possible to insert BR tag inbetween as the datas are dynamic from database. When a label is used seperately wrapping works well but it does not work in the List.However if setPreferredSize is used for label then wrapping takes place but this is also not possible to set the size.