• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

In disabled mode, how do i make JList data to be in black color

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a JList box in my application. In disabled mode the data in the list box looks embossed. (grey color). I want the list box to be in disabled mode but the font should be black in color. Does anybody know how to do this?

thanks
Smriti
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The 'look and feel' takes care of how list items are rendered. Probably, the solution would be to write a new ListCellRenderer to over-ride the default behaviour and then <code> setCellRenderer(myCellRenderer)</code>
 
Smriti Anchu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I added Cell renderer but even then it is not working.


But even then it didnt work....It is displaying in grey color only.

I also tried changing the default value by

Even with this it didnt work. Can u tell me whether the cellrendered class which i have written is correct or not.

If its not correct, can u give me some hints

thnx
smriti
 
reply
    Bookmark Topic Watch Topic
  • New Topic