public void browseInput() {
		try {
			JFileChooser chooser = new JFileChooser(curPath);
			if (converter.canConvert()) {
				chooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
					public boolean accept(File f) {
						return (f.getName().toLowerCase().matches(
							    ".*\\.(bmp|png|ppm|pgm|jp2|raw|tiff|tif|pbm|pnm)") ||
						        f.getName().toLowerCase().matches(".*\\.bcif[0-9]*") ||
						        f.isDirectory());
					}
					public String getDescription() {
						return "Main lossless image formats";
					}
				});				
			} else {
				chooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
					public boolean accept(File f) {
						return (f.getName().toLowerCase().matches(".*\\.bmp") ||
						        f.getName().toLowerCase().matches(".*\\.bcif[0-9]*") ||
						        f.isDirectory());
					}
					public String getDescription() {
						return "BCIF or BMP files";
					}
				});
			}
    		int returnVal = chooser.showOpenDialog(this);
    		if(returnVal == JFileChooser.APPROVE_OPTION) {
				inputfiletxt.setText(chooser.getSelectedFile().
			                      getCanonicalFile().getPath());
			    String sfile = inputfiletxt.getText();
			    inputfiletxt.setCaretPosition(sfile.length()); 
			    if (! sfile.matches(".*\\.bcif[0-9]*")) {
			    	outputdirtext.setText(sfile.substring(
			    		                  0, sfile.length() - 
			    		                  converter.getExtension(sfile).length() - 1) + 
			    	                      ".bcif" /*+ bcifEncoder.version() + 
			    	                      bcifEncoder.subversion()*/);         
					outputdirtext.setCaretPosition(outputdirtext.getText().length());			    	                      
			    } else {
			    	outputdirtext.setText(sfile + ".bmp");    			    	
					outputdirtext.setCaretPosition(outputdirtext.getText().length());			    	
			    }
    			curPath = chooser.getSelectedFile().getPath();			    
    		}	
    	} catch (IOException e) {
    		reportError(e);
    	}	
	}