Yes you must also define that method. Something like this for example:
public void actionPerformed(ActionEvent event){
String menuItemName = event.getActionCommand();
if(menuItemName.equals("Quit")){
System.exit(0);
}
else if(menuItemName.equals("Circle")){
whichShape = 0;
}
else if(menuItemName.equals("Square")){
whichShape = 1;
}
else if(menuItemName.equals("Rectangle")){
whichShape = 2;
}
else if(menuItemName.equals("Arc")){
whichShape = 3;
}
}