• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you displaying the message?
Are you using JOptionPane.showXXXDialog()?

 
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic