I am making a cosmetic SWING GUI program, in NetBeans, just for some fun with friends and it involves a loading screen that really only takes a few milliseconds but I want it to take a few seconds to finish, which is where I am trying to use the Thread.sleep() . The loading is a For-Loop and I know you have to throw InterruptedException but being that it is made with the NetBeans GUI builder you can't add it, I have tried just copy and pasted into a different project but it just comes up with errors. So my question is how I would get the Thread.sleep() to work or if there is some alternative way of causing the program to pause. Thank you
Edit: Basically... How do I get a loop to pause every interval so that five loop intervals take five seconds.