I\'m making a game and i need to update the JProgressBar every 3 seconds. To do that i use a while loop. The problem is that my program freezes becuse of the while loop (i read
You should run your loop in an own Thread:
new Thread( new Runnable() { @Override public void run() { resourceLoader (null); }}).start();
BTW: If you do not use the "String[] args" in the method there is no reason to have it declared in the method.