protected void toolbarHandler ( MyToolBarAction actionBtn )
    {
        if ( actionBtn == formatButton )
        {
            Object selected = JOptionPane.showInputDialog (this,
                                                           "Select Video format",
                                                           "Capture format selection",
                                                           JOptionPane.INFORMATION_MESSAGE,
                                                           null,        //  Icon icon,
                                                           myFormatList, // videoFormats,
                                                           currentFormat );
            if ( selected != null )
            {
                setFormat ( ((MyVideoFormat)selected).format );
            }
        }
        else if ( actionBtn == captureButton )
        {
            Image photo = grabFrameImage ( );
            if ( photo != null )
            {
                MySnapshot snapshot = new MySnapshot ( photo, new Dimension ( imageSize ) );
            }
            else
            {
                System.err.println ("Error : Could not grab frame");
            }
        }
    }