Bueno continuando en esta lucha he conseguido que al hacer click en la fila se me resalte sólo mientras el botón del ratón está pulsado:
Este sería el código en el JFrame:
Código:
public void valueChanged(ListSelectionEvent e)
{
if (this.escuchador != null)
{
if (e.getValueIsAdjusting())
return;
ListSelectionModel m = (ListSelectionModel) e.getSource();
this.mt1.fireTableDataChanged();
}
Este el del render:
Código:
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
{
this.etiqueta.setOpaque(true);
if (isSelected)
{
this.etiqueta.setBackground(Color.red);
}
else
{
this.etiqueta.setBackground(Color.ORANGE);
}
this.etiqueta.setText(value.toString());
return etiqueta;
}
¿Cómo podría mantenerla seleccionada?