Greetings to all members of this great project. It's amazing that evolution had this for so long.
I need your help and would be more than grateful if you could give me, first of all, sorry for my English, I translated it with google translator
I am doing a project in java netbeans, but I was stuck.
I have to load a list of records in a JTable, these records are obtained from 3 different searches and are inserted into the table through a model using DefaultTableModel, even here there are not any problems, but also need, the rows of records of the JTable to be painted. I know this is done via a subclass of TableCellRenderer or DefaultTableCellRenderer, but I could not make even rows or cells to be painted.
the conditions for adding color to the cells or rows are given by a control column added to the insertion of records is called "Tipo" or the code is implemented through filas2 [6], if 1 is paint it green, if it is 2 yellow and 3 red.
I have reviewed quite a few pages and all mentioned the creation of the DefaultTableCellRenderer class, and how to implement it with setDefaultRenderer, I have implemented both but I failed to change the background color.
I'm not sure if implemented poorly or not call the render, so I ask for help, if you could show me my mistake or could explain step by step how to implement this, I would be grateful with all my heart.
Annex class in which I am using the JTable and the render code.