What i'm trying to do is the following:
1. Scan for a String and make it the name of the player
2. That name then gets assigned a user specified color via JColor Chooser
3. The data is stored in an arrayList of type Player, which is defined in the Player class
4. I then add type player to the GUI by using a JTextArea
Here's where I'm having trouble.
5. The displayed text should show the specified color in step 2.
getColor cannot be used for type Color: it wants me to change it to a string. However, that is not what I want to do.
I don't think you can set every line of a JTextArea to a different color. Why don't you use a JList? Then you can specify the colour for each cell.
And I don't think you want a nested loop.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How do you set the color of an array List of JTextArea