@Override
    public void actionPerformed(ActionEvent e) {
        // Extracts the type of source by typecasting it to JMenuItem.
        JMenuItem source = (JMenuItem) (e.getSource());

        // If menu is selected is the Clear Canvas, 
        //      this will clear the canvas and updates status bar.
        if (source.getText().equals("Clear Canvas")) {
            this.theCanvas.clearCanvas();
            this.theCanvas.repaint();
            this.theCanvas.setStatus(
                    "  Canvas is now cleared. Ready to draw.. ");
        }

        // If menu is selected is New
        //      this will destroy all line objects created and clear canvas.
        if (source.getText().equals("New")) {
            this.theCanvas.startANew();
            this.theCanvas.repaint();
            this.theCanvas.setStatus("  New Canvas created. Ready to draw..");
        }

        // If menu is selected is About Application
        //      this will show a pane describing about the application. 
        if (source.getText().equals("About Application")) {
            String pt1 = "<html><body width='";
            String pt2
                    = "'><h1>J-PAINTER</h1>"
                    + "<p>Written in Java 1.7 using AWT and SWING API."
                    + " Look And Feel design by Mikle Garin (WebLaF 1.28) "
                    + "http://weblookandfeel.com"
                    + " "
                    + "<br><br>"
                    + "<p>All Rights Reserved 2014 <br>Ryan Gilera"
                    + "";

            int width = 175;
            String s = pt1 + width + pt2;

            JOptionPane.showMessageDialog(null, s);
        }
    }