• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Creating multiple frames in sequence in a for loop

Hi again !!

I was trying to do something like this: I have a JDialog which shows up when a for loop is executing. In the for loop I manipulate the content of the JDialog to show some new content. This JDialog pops-up within the for loop. But when I run the program I see only the last content added to the content pane of JDialog. The reason being the for loop doesnt stop after showing the JDialog. I want the sequence to be maintained. So is there any way in which I can wait within the for loop for the JDialog window to close ?? So that when the user closes the JDialog I continue with the for loop and generate the next JDialog ??

regards
Ashish Sarin
0
sarin_ashish
Asked:
sarin_ashish
  • 2
1 Solution
 
CI-Ia0sCommented:
Create the dialog separately and have it updated from within the loop. Will that work or does the dialog have to be within the loop? (I'm not exactly sure whether you need to keep creating new dialogs or just updating one dialog...)
0
 
sarin_ashishAuthor Commented:
I figured out how this can be done. thanks.  I made a modal dialog, in which the method that creates the Dialog returns only after the shown dialog box is disposed.
0
 
CI-Ia0sCommented:
Sounds good. :)
0
 
Computer101Commented:
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now