This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the best way to implement this?  RSS feed

 
Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The scenario is that there's two Frame A and B, A should be start first, in it, user can do some configuration (likely to configure the path of the log file), after it is done, the Frame B will show to user.(which is tne main UI of the application).

Currently, I start Frame B when user click the OK button of Frame A (hide the A itself and show the Frame B), but it make the code looks so ugly and hard to read, what I want to do is to centralize all this code to a single file like StartUp class.

But how to make the Frame B "wait" for Frame A to finish its configuraion? I try to use the SwingUtilities.invokeAndWait but it seems only can make the Frame A display first, after it fully display the Frame B will aslo show out.
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!