Show colored text on a text object

L

lrantisi

I have a chat program.
The messages sent from users will be shown in different colors.
What is the suitable object for that.
The object should be scrollable.
 
A

Andrew Thompson

lrantisi said:
I have a chat program.
The messages sent from users will be shown in different colors.
What is the suitable object for that.

Questions usually end in a question mark (e.g. '?')
please use question marks in future.

Most Swing components can render basic HTML, so that
is one way to get colored text. For a more serious
approach, it is probably better to use a JTextPane/JEditorPane
and use a styled document.
The object should be scrollable.

Put it in a JScrollPane.

Andrew T.
 
A

Andrew Thompson

lrantisi said:
I have a chat program.
The messages sent from users will be shown in different colors.
What is the suitable object for that.

Why did you ask this question again?
<http://groups.google.com/group/comp...09bbfe45103/115a2aa40919f60b#115a2aa40919f60b>
It seems like the answers you got the first time
were more detailed than the one I provided.

Were you hoping that the technology for displaying
colored text had improved in the (checks watch)
16 days since you had asked that question?

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top