Removed the initial delay by using Toolkit to get screen width and height