@Override
    public void itemStateChanged(ItemEvent e){
        int pos = 0,i;
        for(i = 0; i < gramListP1.getItemCount(); i++)
            if(gramListP1.getItem(i).equals("Rules:")){
                pos = i;
                break;
            }
        //System.out.println(new Integer(pos).toString());
        
        if(gramListP1.getSelectedIndex() > pos)
            delButtonP1.setEnabled(true);
        else
            delButtonP1.setEnabled(false);
    }