Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JList or JTable with multiline / autowrap text

806212Oct 19 2010 — edited Oct 20 2010
Hello Guys,

Hope some of You can help me. I try to find a good solution for my following issue:
I would like to implement a fixed width chat panel (1 JTextField for chat input + 1 button + 1 JTable or JList for messages with scrollpane).
This is not a hard task but 2 issues I have:
* How can I change the rows color background?
* How can I auto wrap the text if the column width limit reached?

check this sample image (i would like to implement the "same" for the messages): [http://www.festekoutlet.hu/jlist_autowraptext.jpg]

in fact the 2nd issue or question is the most important not the alter bg..

looking fw your replies
thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2010
Added on Oct 19 2010
4 comments
1,500 views