Solved

Creating multiple frames in sequence in a for loop

Posted on 2004-08-30
6
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 3

Expert Comment

by:CI-Ia0s
ID: 11936976
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
ID: 11937434
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
ID: 11937450
Sounds good. :)
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12319463
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb on wildfly 5 61
How  can  i  resolve  HTTP Status 404 -? 8 76
Tomcat 9 + java 8 error while trying to deploy a war file 2 840
Java import explained 4 44
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

738 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