private void exportButtonActionPerformed(java.awt.event.ActionEvent evt) {
if ("PDF(.pdf)".equals(jComboBox1.getSelectedItem())) {
query = queryPane.getText();
filePath = selectedFolder.getText();
new DataBaseToPDF(filePath, query);
}
}
This is a code fragment to export data to a pdf file(DataBaseToPDF(filePath,query)
) on a button click. While the process runs in background, I would like to display a progress bar till the export completes. I have come across many examples which tells how to create a JProgressBar
but none of them tell how to link it to the running java application.
Tell me how to do it.