How does the event dispatch thread work?

前端 未结 4 677

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

4条回答
  •  余生分开走
    2020-11-30 09:51

    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.

提交回复
热议问题