protected void selectImageFilter(){
        FileNameExtensionFilter imageFilter;
        imageFilter= new FileNameExtensionFilter("JPEG (*.jpg,*.jpeg,*.jpe,*.jfif)","jpg","jpeg","jpe","jfif");
        this.stringSelectedExtension="jpg";
        switch(this.selectedExtensionImage){
            case bmp:
                imageFilter = new FileNameExtensionFilter("Bitmap (*.bmp, *.dib)","bmp","dib");
                this.stringSelectedExtension="bmp";
                break;
            case gif:
                imageFilter = new FileNameExtensionFilter("GIF (*.gif)","gif");
                this.stringSelectedExtension="gif";
                break;
            case jpg:
                imageFilter = new FileNameExtensionFilter("JPEG (*.jpg,*.jpeg,*.jpe,*.jfif)","jpg","jpeg","jpe","jfif");
                this.stringSelectedExtension="jpg";
                break;
            case png:
                imageFilter = new FileNameExtensionFilter("PNG (*.png)","png");
                this.stringSelectedExtension="png";
                break;   
        }
        this.selectorImage.setFileFilter(imageFilter);
    }