m 14 . addactionlistener(this);
m 1 . add(m 14);
And if (e.getActionCommand()== "exit ").
system . exit(0);
This should be changed to if(e.getActionCommand ()). Equal to ("exit") {
} This is the standard.