public void actionPerformed(ActionEvent e) {
    	if ("btnOK".equals(e.getActionCommand())) {
    		int type;
    		if (optCont.isSelected())
    			type = 2;
    		else
    			type = 1;    		
    		String name = objective.getName();
    		objective.updateDetails(type, txtName.getText(), txtUnit.getText());
    		con.getAltPanel().updateObjDetails(objective, name);    		
            con.getAltPanel().updateTable();
        	frame.setVisible(false);
            } 
        else if ("btnCancel".equals(e.getActionCommand())) 
        	frame.setVisible(false);
        else if ("optCont".equals(e.getActionCommand())){ 
        	txtUnit.setEnabled(true);
        	lblUnit.setForeground(Color.BLACK);  	
        }
        else if ("optDisc".equals(e.getActionCommand())){
        	txtUnit.setEnabled(false);
        	lblUnit.setForeground(Color.LIGHT_GRAY);        
        }
        else JOptionPane.showMessageDialog(frame, "Error!");
    }