List of usage examples for javax.swing JFileChooser getComponent
public Component getComponent(int n)
From source file:forms.FormFluxodeCaixa.java
public void Excel() { JFileChooser fileChooser = new JFileChooser(); if (fileChooser.showSaveDialog(fileChooser.getComponent(0)) == JFileChooser.APPROVE_OPTION) { //Exibe janela onde salvar o arquivo HTML File file = fileChooser.getSelectedFile(); //Pega o caminho completo String caminho;//www . j a va 2 s . c om if (file.getPath().contains(".xls")) { caminho = file.getPath(); } else { caminho = file.getPath() + ".xls"; } new ExportacaoParaExcel().Exportar(caminho, dataInicial, dataFinal, FiltroData.values()[comboFiltroData.getSelectedIndex()]); } }