In my program, I am calling a constructor for a JFrame and several components and immediately afterwards, I am calling a method doing heavy computing and locking the CPU for several seconds. Because of this and because both the JFrame and that method are in the same Thread, the JFrame will not composite properly until after the method is finished.
Window window = new Window(); //Window extends JFrame and adds several components to it
calculatePiOrWhatever();