Solved

Creating multiple frames in sequence in a for loop

Posted on 2004-08-30
6
191 Views
Last Modified: 2010-03-31
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
Comment
Question by:sarin_ashish
  • 2
6 Comments
 
LVL 3

Expert Comment

by:CI-Ia0s
Comment Utility
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
 

Author Comment

by:sarin_ashish
Comment Utility
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
 
LVL 3

Expert Comment

by:CI-Ia0s
Comment Utility
Sounds good. :)
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
Comment Utility
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now