hello guys i created this program to make a menu for test styling and i have problem with the event handling
here is the code 

import javax.swing.*;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import java.awt.event.ItemEvent;
import java.awt.Color;
import java.util.*;
import java.awt.*;

public class Lab7ex extends JFrame{

private JMenu m1;
private JMenu m2;
private JMenu m3;
private JMenu m4;
private JCheckBoxMenuItem[] sm1;
private JRadioButtonMenuItem[] cm1;
private JRadioButtonMenuItem[] cm2;
private JMenuItem exit;
private final Color[] colors={Color.BLACK,Color.BLUE,Color.RED,Color.PINK};
    private JLabel l1;
    private ButtonGroup cgroup;
    private ButtonGroup sgroup;
    private int style;  
public Lab7ex() {
super("JMenus EX");

m1=new JMenu("File");

Handler h= new Handler();

exit=new JMenuItem("Exit");


JMenuBar bar=new JMenuBar();

m2=new JMenu("Color");

String[] color={"BLACK","BLUE","RED","PINK"};

cm1=new JRadioButtonMenuItem[color.length];

cgroup=new ButtonGroup();

for(int count=0;count