Cor na JTable

Hey, alguem poderia me falar como botar cor em uma linha do JTable?

Obrigado.

Ola Gabriel Neto,

Tente fazer da seguinte forma, aqui_vc_coloca_o_nome_do_seu_JTable.setBackground(new Color(217,217,217));

ola leandro onde eu devo botar?

olha o codigo:

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumnModel;
import javax.swing.JLabel;

import java.awt.Font;

import javax.swing.ImageIcon;
import javax.swing.JButton;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JTextField;

import java.awt.Color;
import java.sql.SQLException;

import javax.swing.SwingConstants;

import sistema.bin.ClienteBin3;
import sistema.conexao.ClienteControl3;

import javax.swing.ScrollPaneConstants;
import javax.swing.border.MatteBorder;

public class ConsultaProdutos extends JFrame {

String[] coluna = {"","ID","Nome","Preço","Código","Marca","Quantidade"};
String [][] linhas = {};
private DefaultTableModel tabela = new DefaultTableModel(linhas,coluna); 
private JScrollPane Scroll = null;
private JTable Tabela = null;

private ClienteControl3 CliControl = new ClienteControl3();
ClienteBin3 CliBin = new ClienteBin3();

private JPanel contentPane;
private JTextField jtfCod;
private JTextField jtfNome;

public static void main(String[] args) {
	EventQueue.invokeLater(new Runnable() {
		public void run() {
			try {
				ConsultaProdutos frame = new ConsultaProdutos();
				frame.setVisible(true);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	});
}
private JTable getTabela() {
	
	if (Tabela == null) {
		
		Tabela = new JTable(tabela);
		
		Tabela.addMouseListener(new MouseAdapter() {
			
			public void mouseReleased (MouseEvent e) {
			
				int i = Tabela.getSelectedRow();
				Object x  = Tabela.getValueAt(i,1);
				String codigo = x + "";
			
			}
			
		});
	
	}
	return Tabela;
}
private JScrollPane getScroll() {
	
	if (Scroll == null) {
		
		Scroll = new JScrollPane();
		Scroll.setViewportBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));
		Scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		Scroll.setBackground(new Color(0, 0, 0));
		Scroll.setBackground(new Color(217,217,217));
		Scroll.setViewportView(getTabela());
		Scroll.setBounds(7,195,653,181);
		defineRenderers();
		
	}
	return Scroll;
}
private void defineRenderers() {
	
	Tabela.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
	JTableHeader header = Tabela.getTableHeader();
	header.setPreferredSize(new Dimension(2000,25));
	TableColumnModel modeloDaColuna = Tabela.getColumnModel();
	
	modeloDaColuna.getColumn(0).setPreferredWidth(50);
	modeloDaColuna.getColumn(1).setPreferredWidth(70); //id
	modeloDaColuna.getColumn(2).setPreferredWidth(140);//nome
	modeloDaColuna.getColumn(3).setPreferredWidth(100);//preco
	modeloDaColuna.getColumn(4).setPreferredWidth(70); //codigo
	modeloDaColuna.getColumn(5).setPreferredWidth(130);//marca
	modeloDaColuna.getColumn(6).setPreferredWidth(90);//quantidade
}	
public ConsultaProdutos() {
	
	setTitle("B.C. Systems");
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setBounds(100, 100, 686, 422);
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);
	contentPane.add(getScroll(),null);
	;
	
	JLabel label = new JLabel("Consultas dos Pre\u00E7os dos Produtos");
	label.setIcon(new ImageIcon("D:\\IFBA\\4 Ano\\III Unidade\\Trabalho ADS e P.O.O\\Imagens\\lupa2.png"));
	label.setFont(new Font("Tahoma", Font.PLAIN, 22));
	label.setBounds(10, 11, 422, 48);
	contentPane.add(label);
	
	JButton button = new JButton("SAIR");
	button.setBackground(Color.WHITE);
	button.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			
			System.exit(0);
			
		}
	});
	button.setIcon(new ImageIcon("D:\\IFBA\\4 Ano\\III Unidade\\Trabalho ADS e P.O.O\\Imagens\\adf.png"));
	button.setFont(new Font("Tahoma", Font.PLAIN, 15));
	button.setBounds(551, 11, 109, 49);
	contentPane.add(button);
	
	JButton button_1 = new JButton("VOLTAR");
	button_1.setBackground(Color.WHITE);
	button_1.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			
			new TelaInicial().setVisible(true);
			
		}
	});
	button_1.setIcon(new ImageIcon("D:\\IFBA\\4 Ano\\III Unidade\\Trabalho ADS e P.O.O\\Imagens\\voltar1.png"));
	button_1.setFont(new Font("Tahoma", Font.PLAIN, 15));
	button_1.setBounds(406, 11, 135, 49);
	contentPane.add(button_1);
	
	JButton button_6 = new JButton("CONSULTAR");
	button_6.setBackground(Color.WHITE);
	button_6.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent arg0) {
			
			try {
				CliControl.preenche_tabela(Tabela,jtfNome,jtfCod);
			} catch (SQLException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
			
			
		}
	});
	button_6.setIcon(new ImageIcon("D:\\IFBA\\4 Ano\\III Unidade\\Trabalho ADS e P.O.O\\Imagens\\Search-icon (1).png"));
	button_6.setFont(new Font("Tahoma", Font.PLAIN, 14));
	button_6.setBounds(7, 142, 154, 48);
	contentPane.add(button_6);
	
	JButton button_7 = new JButton("LIMPAR");
	button_7.setBackground(Color.WHITE);
	button_7.addActionListener(new ActionListener() {


		public void actionPerformed(ActionEvent e) {
			
			jtfNome.setText("");
			jtfCod.setText("");
			JOptionPane.showMessageDialog(null,"Campos Limpos!");
			
		}
	});
	button_7.setIcon(new ImageIcon("D:\\IFBA\\4 Ano\\III Unidade\\Trabalho ADS e P.O.O\\Imagens\\Eraser-icon.png"));
	button_7.setHorizontalAlignment(SwingConstants.LEFT);
	button_7.setFont(new Font("Tahoma", Font.PLAIN, 15));
	button_7.setBounds(171, 142, 124, 48);
	contentPane.add(button_7);
	
	JButton button_8 = new JButton("ADICIONAR AO CARRINHO DE COMPRAS");
	button_8.setBackground(Color.WHITE);
	button_8.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			
			new Vendas().setVisible(true);
		}
	});
	button_8.setIcon(new ImageIcon("D:\\IFBA\\4 Ano\\III Unidade\\Trabalho ADS e P.O.O\\Imagens\\math-add-icon.png"));
	button_8.setHorizontalAlignment(SwingConstants.LEFT);
	button_8.setFont(new Font("Tahoma", Font.PLAIN, 15));
	button_8.setBounds(305, 142, 355, 48);
	contentPane.add(button_8);
	
	JLabel label_1 = new JLabel("Nome do Produto:");
	label_1.setFont(new Font("Tahoma", Font.PLAIN, 14));
	label_1.setBounds(10, 92, 124, 39);
	contentPane.add(label_1);
	
	JTextField c = new JTextField();
	c.setColumns(10);
	c.setBounds(131, 92, 200, 39);
	//contentPane.add(a3);
	
	JLabel label_3 = new JLabel("C\u00F3digo do Produto:");
	label_3.setFont(new Font("Tahoma", Font.PLAIN, 14));
	label_3.setBounds(341, 91, 136, 40);
	contentPane.add(label_3);
	
	jtfCod = new JTextField();
	jtfCod.setColumns(10);
	jtfCod.setBounds(470, 92, 190, 39);
	contentPane.add(jtfCod);
	
	jtfNome = new JTextField();
	jtfNome.setColumns(10);
	jtfNome.setBounds(131, 92, 200, 39);
	contentPane.add(jtfNome);
}

}

Tenta colocar assim modeloDaColuna.setBackground(new Color(217,217,217));

due erro setbackground

The Method setBackground(Color) is undefined for the type TabelColumnModel