I am creating an object of Downloader JFrame class in the constructor of the main form and calling its setVisiblity(true) method on download button click.
The problem is Downloader frame is showing but when the method has termininated:
Downloading dn = new Downloading();
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
dn.setVisible(true);
try {
Thread.sleep(5000);
} catch (InterruptedException ex) {
Logger.getLogger(GehuConnectMain.class.getName()).log(Level.SEVERE, null, ex);
}
}
The form is showing after 5 second what is the solution ?