Results 1 to 6 of 6
Thread: Dynamic Multi-Colored Text
- 12-02-2012, 04:07 AM #1
Member
- Join Date
- Nov 2012
- Posts
- 43
- Rep Power
- 0
Dynamic Multi-Colored Text
Hey guys. I've been reading tutorials on JEditorPane and JTextPane but i can't figure out how to do what I want. I have a client and server chat program where I want the chatDisplay to appear in different colors. The chatDisplay gets appended every time an event happens such as someone joining or leaving or someone types something. How can I make this work?
-
Re: Dynamic Multi-Colored Text
Can you show what you've tried, preferably in a small compilable and runnable program? That way we'll all have something we can work with as a starting basis. Also what type of styled document are you using?
- 12-02-2012, 04:14 AM #3
Member
- Join Date
- Nov 2012
- Posts
- 43
- Rep Power
- 0
Re: Dynamic Multi-Colored Text
I haven't tried using styled document yet because I don't understand how it would work in my situation (where the chatDisplay needs to get updated with new information). I am currently using a JTextArea.
-
Re: Dynamic Multi-Colored Text
The tutorials have sample demo code that compiles and runs, I suggest that you start there as that's always a good place to start.
- 12-02-2012, 09:06 AM #5
Member
- Join Date
- Nov 2012
- Posts
- 43
- Rep Power
- 0
Re: Dynamic Multi-Colored Text
Which tutorials do you mean?
- 12-02-2012, 09:21 AM #6
Re: Dynamic Multi-Colored Text
If you're forever cleaning cobwebs, it's time to get rid of the spiders.
Similar Threads
-
Text to Colored Dots: what is the most efficient way to accomplish this?
By FunkyJustice in forum New To JavaReplies: 2Last Post: 11-20-2012, 09:24 PM -
colored text with System.out.println
By novice in forum New To JavaReplies: 4Last Post: 07-08-2011, 09:48 PM -
multi selection of text
By joypik in forum New To JavaReplies: 10Last Post: 06-27-2010, 08:45 AM -
Print multi-colored characters in a sentence
By Jeff Smith in forum New To JavaReplies: 1Last Post: 07-24-2009, 03:43 AM -
Preventing inserted text from becoming colored from previous style
By jkhoa in forum AWT / SwingReplies: 2Last Post: 08-10-2007, 12:36 AM
Bookmarks