With the help of people on stackoverflow I was able to get the following working code of a simple GUI countdown (which just displays a window counting down seconds). My main
This is simple, it is as follows
Step 1 . Initial thread also called main thread is created.
Step 2. Create a runnable object and pass it to invokeLate().
Step 3. This initialises the GUI but does not create the GUI.
Step 4. InvokeLater() schedules the created object for execution on EDT.
Step 5. GUI has been created.
Step 6. All events occurring will be placed in EDT.