Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Child Frame's compoenent (JFrame) is not displayed till parent frame exceution

 
Balaji Soundarajan
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JFrame and i have OK button. If we click on the OK button then message "Service Updating..." should display in the child frame or Dilaog and the parent process should not be blocked.

Currently the problem we are phasing is Child JFrame component (JLabel) is not displayed till the parent process gets exceuted.

Please dot the needful.

Regards
-Balaji Raghu
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your "Service Updating..." sounds like it is the proverbial 'long running task', and this

> Currently the problem we are phasing is Child JFrame component (JLabel) is not displayed till the parent process gets exceuted.

is a symptom of doing the 'long running task' is the swing thread (EDT), which blocks it.

if so, the fix would be to do your "Service Updating..." in a separate thread/swingworker/whatever, anything but the EDT
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you displaying the message?
Are you using JOptionPane.showXXXDialog()?

 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!