FileChooser fc = new FileChooser(); FileChooser.ExtensionFilter fileExtensions = new FileChooser.ExtensionFilter( "Web pages", "*.tpl", "*.html", "*.htm"); fc.getExtensionFilters().add(fileExtensions);