Initialization of application and splash-screen with progress bar (Swing)

前端 未结 1 1144
夕颜
夕颜 2021-01-15 04:29

We have built a splash screen for our application. It works fine when the initialization of application is in the main thread, but when I move the initialization in EDT (Swi

相关标签:
1条回答
  • 2021-01-15 04:58

    Load the source data in the doInBackground() method of a SwingWorker, and publish() intermediate results; update the GUI component's model in process(). While data continues to load, initial results will be displayed and the GUI will function nominally. The real time to load data will remain unchanged, but the perceived time will be less.

    0 讨论(0)
提交回复
热议问题