Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextArea Alternate Row color Change  RSS feed

 
Dhiraj Malhotra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to change the color of text area alternet rows...???
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need a control with one item per line you may want to consider switching to JList. With your own ListCellRenderer you can then do what you want.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also want to consider the Highlighter for which an example can be found here http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!