wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes How to conditionally change text color? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How to conditionally change text color?" Watch "How to conditionally change text color?" New topic
Author

How to conditionally change text color?

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329

Would any of you guys happen to know how I can conditionally change the color of text that's within a ListView?
Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
Actually. I forgot to mention that it is a wicket org.apache.wicket.markup.html.list.ListView.
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

You can add a SimpleAttributeModifier. For an example how to use alternating color in a list have a look at http://apache-wicket.1842946.n4.nabble.com/change-tr-background-color-when-ListView-iterate-td1894024.html
rajeev yadav
Greenhorn

Joined: Mar 28, 2011
Posts: 26
Use SimpleAttributeModifier to change the text color.
 
 
subject: How to conditionally change text color?
 
Similar Threads
Changing Color of a selectedtext in TextArea
Change Text area's Limited Text Color
Change color of a LookAndFeel
HTML text Color Changer
How to make JComboBox flash (red color)?