public boolean doCutCopyCrop( boolean clearArea, boolean doCrop, boolean useClipboard )
    {
        ImageFrame img_frame = main_frame.getFrameManager().getSelectedFrame();
        Rectangle rect = getSelectedArea(img_frame);
        if( rect == null )
        return false;

        int x = (int)rect.getX();
        int y = (int)rect.getY();
        int width = (int)rect.getWidth();
        int height = (int)rect.getHeight();

        //get image from selected area
        Image img = img_frame.getJIPTImage().getImage();
        int imageSize = width * height;
        int newImageData[] = new int[imageSize];

        //use PixelGrabbery to grab selected area
        PixelGrabber pg = new PixelGrabber(img, x, y, width, height, true);
        try
        {
            pg.grabPixels();
        }
        catch(Exception e)
        {
            // System.out.println(e.toString());
        }
        newImageData = (int []) pg.getPixels();

        //create image from imageData
        Image newImage = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(width,
                height,newImageData,0,width));

        if( doCrop )
        {
            //Don't overwrite clipboard for crop
            img_frame.setFrameImage( newImage, true );
        }
        else
        {
            //store selected image to clipboard or dragboard
            if( useClipboard )
            {
                clipboard_image = newImage;
                main_frame.menu_bar.pasteNewEditMenuItem.setEnabled(true);
                main_frame.menu_bar.pasteEditMenuItem.setEnabled(true);
                img_frame.enablePasteAction(true);
            }
            else dragboard_image = newImage;

            if( clearArea ) //cut selected area and add image to undo stack
                clearArea(img_frame, x, y, width, height);
            //else just add image to undo stack
            else img_frame.setFrameImage( img, true );

        }
        img_frame.clearSelectionRectangle();
        return true;
    }//end doCutCopyCrop()