use of javax.swing.filechooser.FileNameExtensionFilter in project beast-mcmc by beast-dev.
the class BeautiFrame method doImport.
public final void doImport() {
File[] files = selectImportFiles("Import Aligment...", true, new FileNameExtensionFilter[] { new FileNameExtensionFilter("Microsatellite (tab-delimited *.txt) Files", "txt"), new FileNameExtensionFilter("NEXUS, BEAST or FASTA Files", "nex", "nexus", "nx", "xml", "beast", "fa", "fasta", "afa") });
// new FileNameExtensionFilter( "Microsatellite (tab-delimited *.txt) Files", "txt");
if (files != null && files.length != 0) {
importFiles(files);
tabbedPane.setSelectedComponent(dataPanel);
}
}
use of javax.swing.filechooser.FileNameExtensionFilter in project opentheso by miledrousset.
the class BaseDeDonnesBean method inyectionaBDD.
/**
* @throws ClassNotFoundException
* @throws SQLException
*/
public void inyectionaBDD() throws ClassNotFoundException, SQLException {
File fichero;
importxml impo = new importxml();
JFileChooser fileChooser = new JFileChooser();
FileNameExtensionFilter ft = new FileNameExtensionFilter("*.xml", "xml");
fileChooser.setVisible(true);
fileChooser.setFileFilter(ft);
int seleccion = fileChooser.showOpenDialog(null);
if (seleccion == JFileChooser.APPROVE_OPTION) {
fichero = fileChooser.getSelectedFile();
impo.ouvreFichier2(connect.getPoolConnexion(), fichero);
}
}
Aggregations