This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
I am working on quite complex GUI project and we have almostly customzied every Component class.
I am facing very weird problem which I have never faced.
I have combo box on screen and It is enabled and non editable.
Programmitcally I do some complex things and populate it. The thing is that the elements in combo box are of grey color instead of default black color. I have checked my renderer classes etc and till now it was working fine but I add some new functionalty in my GUI and I came up with this problem.
I did not make any changes to my combo box class or its related classes. I just add new component on my screen,
as last line of function which populates combo box, combo box elements turn into black again.
I have tried repaint() , validate() and pack() on my frame but nothing works even I have called explicitly setForeground(Color.BLACK) on my combo box. it does not help. Can some one help me why elements are turning into grey and how they turn into black again after putting above java line.