Check out example codes for "how to set background color in jframe in java". It will help you in understanding the concepts better.

Code Example 1

package Exaple;

import java.awt.Color;

import javax.swing.JFrame;

public class Window {

	public static void main(String[] args) {
		
		JFrame frame = new JFrame(); 
		frame.setExtendedState(JFrame.MAXIMIZED_BOTH); 
		frame.setVisible(true);
		frame.setTitle("Expaple");
		frame.setBackground(Color.BLUE);
	}

}

Code Example 2

getContentPane().setBackground(Color.YELLOW);  //Whatever color

Learn ReactJs, React Native from akashmittal.com