for (int i = 0; i <=100;i++){ Thread.sleep(40); if(i<=30){ lblLoad.setText("Initilizing Components..."); }else if(i<=50){ lblLoad.setText("Initializing Database Connection..."); //new mainCLass().openDB(); }else if(i<=80){ lblLoad.setText("Initializing User Interface..."); }else{ lblLoad.setText("Please wait..."); } }
This doesn't change my label. Only 1st one runs and others dont change. In java swing it worked but in Javafx doesn't. Please help!