I want to make jave code (two buttons that changes the background) but i have errors can someone help
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class colorbutton extends JFrame implements Actionlistener { private JButton red = new JButton("red"); private JButton blue = new JButton("blue"); public colorbutton() { getContentpane().setLayout(new FlowLayout()); getcontentpane().add(red); getcontentpane().add(blue); red.ActionListener(this); blue.ActionListener(this); } public void actionperformed(ActionEvent k) { if (k.getsource()== red) { getcontentpane().setBackground(color.RED); } else if (k.getsource()== blue) { getcontentpane().setBackground(color.BLUE); } } public static void main (string[] args) { colorbutton frame = new colorbutton(); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setsize(300,200); } }