java setbackground code example Example: setbackground java setBackground(Color.cyan); // sets predefined color cyan to background of frame