/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package VerFichas;

import java.awt.Color;
import java.awt.Component;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;

/**
 *
 * @author chuen
 */
public class JTableRenderer extends JTable {
    
     
      
    public Component prepareRenderer(TableCellRenderer renderer, int row, int column){
        Component component = super.prepareRenderer(renderer, row, column);
        component.setBackground(Color.WHITE);
        component.setForeground(Color.BLACK);
        
        if(row%2==0){
          component.setBackground(Color.getHSBColor(0, 0, 66));
        }
        
        return component;
    }
    
    

    

   
}

