Sure, this is basically how i've tried to change the background colour, with only the JTextArea colour changing, the JLabel stays the same:
public class Compare extends JPanel
{
JLabel title = new JLabel();
JTextArea text = new JTextArea();
GridBagConstraints c = new GridBagConstraints();
GridBagLayout layout = new GridBagLayout();
public Compare()
{
this.setLayout(layout);
title.setBackground(Color.blue);
text.setBackground(Color.yellow);
c.gridx = 0;
c.gridy = 0;
add(title, c);
c.gridx = 1;
add(
test, c);
}
}