My javafx desktop application load and big text file during the initialization of the application in the
@Override
public void initialize(URL url, ResourceBundle rb) {
loadAppConfigurationFile();
}
private void loadAppConfigurationFile() {
Task<Void> task = new Task<Void>() {
@Override
public Void call() throws InterruptedException {
//read file and do some operation
return null;
}
};
new Thread(task).start();
}
But the problem here is my application GUI doesn't appear till this process it over. I invoked this file reading in another thread excepting that my GUI stage/scene will be loaded first and their I can show some loading message till that file is loaded in the system.
Kindly tell the exact workaround for this.
i try this and its work easily...here
bar
is a progress bar