문제

I have kept some colors for animals in Database. Say there are four animals and have assigned four colors for each in Database. In jTable when i select an animal of my choice ,i need to the color also to be applied.

Ex-If i click Elephant ,the assigned color should be my background.

도움이 되었습니까?

해결책

Cell formatting is the responsibility of the TableCellRenderer

Take a look at Using Custom Renderers for more details

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top