How can i set different action commands while implementing an action listener?
<pre><code>import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

class Menu extends JFrame implements ActionListener{    

    // Create the components and global variables
    JButton newGameButton = new JButton("New Game");
    JButton instructionGameButton = new JButton("Instructions");
    JButton exitButton = new JButton("Exit");
    JLabel mylabel = new JLabel("Welcome to Blackjack");

    public Menu()
    {

        // Create the window
        super("ThreeButtons");
        setSize(300,100);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);

        //Creating the container for the components and set the layout
        Container content = getContentPane();
        FlowLayout layout = new FlowLayout();
        content.setLayout(layout);

        //Adding the event listener
        newGameButton.addActionListener(this);
        instructionGameButton.addActionListener(this);
        exitButton.addActionListener(this);

        //Adding of components
        content.add(mylabel);
        content.add(newGameButton);
        content.add(instructionGameButton);
        content.add(exitButton);


        setContentPane(content);

    }

    //Add the event handler
    public void actionPerformed(ActionEvent event)
    {
    if (event.getActionCommand()=="New Game")
    new lol4();

    if (event.getActionCommand()=="Instructions")
    //new Instructions();

    if (event.getActionCommand()=="Quit ?")
    System.exit(0);


    }


    public static void main (String[] args)
    {
        //Create an instance of my class
    new Menu();
    }

}
</code></pre>

<p>Exit does not seem to work</p>
