Try using a JTable and then alternating the colors of the row. This way you can write a generic JComponent (AlternatingColorTable) and use it just like a regular JTable in those 4 panels.
Something like this maybe:
public class AlternatingColorTable extends JTable {
public AlternatingColorTable () {
super();
}
public AlternatingColorTable(TableModel tableModel) {
super(tableModel);
}
/** Extends the renderer to alternate row colors */
public Component prepareRenderer(TableCellRenderer renderer, int row, int col) {
Component returnComp = super.prepareRenderer(renderer, row, col);
Color alternateColor = Color.GRAY;
Color mainColor = Color.DARK_GRAY;
if (!returnComp.getBackground().equals(getSelectionBackground())) {
Color background = (row % 2 == 0 ? alternateColor : mainColor );
returnComp.setBackground(background);
background = null;
}
return returnComp;
}
}