Does JDialog setVisible create a new threaD?

I am having a problem with my program and it seems that it may be because my call to JDialog setVisible is creating a new thread. In my program I have a JDialog which is a creation wizard that puts some specific files in the specified directory. After this is done I try and zip up the contents and bundle the zip file with some other files. My problem is that if I don't place a dialog after my call JDialog setVisible() then not all the right files will be in the newly created zip. It seems to me this is likely happening because the call to setVisible is creating a new thread and operation is continuing before the wizard is done placing all the right files in the directory. Does this make sense? Does setVisible create its own thread?

In the future Swing related questions should be posted in the Swing forum.
No a new thread is not created. setVisible() displays the dialog. If the dialog is modal then statements after the setVisibile are not executed until the dialog is closed. If the dialog is not modal, then the statements execute right away.

Similar Messages

  • Cannot reply to forum post without being registered; but can't register without creating a new thread

    I wished to reply to a forum post with new information that will be of relevance to anyone searching for a solution to a particular problem. I did not have a support account with Mozilla. I found that the site would not allow a reply from an unregistered person. Fair enough, but it gives you no way to create an account then reply to the post. The only way you can create an account is by creating a new thread - which is what I am doing now! Crazy or what? It then took about 10 minutes thrashing about on the site to find out how to create an account. Frustrating or what? Thank goodness Firefox itself is built to much higher standards.

    Suggested fix for an admin to apply:
    Replace the text that appears at the bottom of a thread while signed out - "You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet."
    ...with one that reads "You must log in to your account to reply to posts. Please [https://support.mozilla.org/get-involved sign up to contribute], or start a new question, if you do not have an account yet."
    This little seeming catch-22 gave me a chuckle, but I'm glad this thread was already here so that I didn't have to waste space. Someone needs to fix this soon though, lest it put more people off contributing.

  • Limited subject characters count when creating a new thread in Portal 7.3 forums

    Hello,
    i was wondering if and how you can change the max. characters for the subject when creating a new thread in Portal 7.3 forums.
    It seems like the character count is limited to 75 characters for subjects.
    I didn't find any suitable property, in the forums admin console, for that issue.
    Thanks

    Hi Andrzej,
    Have faced a similar issue in EP 7.01. It was due to the missing Super Admin access - Save was clocking & timing out.
    Upgraded the Admin permissions and this issue was resolved.
    Hope this helps.

  • Executor vs Thread for creating a new thread

    Hello,
    It's a little question :
    which is the best or most preferable way to create a new Thread?
    Thread t = new Thread(this);
    t.start();or using the Executor class ?
    Executor.execute(Runnable r)
    new Thread(r)).start();Thanks in advance!

    Hi Kolarius,
    If you only have one thread to run, the first solution is sufficient as long as you need the runnable executed by the thread being the caller of the thread itself.
    In the second example, you start a new thread apart from the caller. You can have the same result without using an executor.

  • Why does mail keep creating a new junk mail folder?

    Why does mail keep creating a new junk mail folder at the bottom of my folders. This is in addition to the standard junk mail folder.

    Hi Michael
    Welcome to the forum.
    Do you have Stuffit installed and are saving to the desktop?
    Because in that case it is Stuffit decompressing the Pages document's package.
    Just save to your document folder.
    Peter

  • How to create a new thread in display function -----Java OpenGL

    use netbean 6.1 to do this work.
    public void display(GLAutoDrawable drawable) {
          GL  gl = drawable.getGL();
          //I want to create a new thread here to draw an object
          Thread dt = new Thread(new DrawThread(gl,2),"Thread0");    //create a thread,DrawThread is a class I define
          //but it failed when compiling
          //are there any other ways or how to improve my method?
    }I want to do like this because I do not like to block the main thread when it is drawing an object

    Well, the autocode in your application is maintained by your autocode module, any attempt at changing it will result in having it reset back to the original autocode--that's one of the gotcha's about using autocode.
    Since it looks like you may not have the skills to do what you are asking and relying on the autocoder, you should probably start here:
    [Java Tutorial|http://java.sun.com/docs/books/tutorial/]
    And stay there until you are comfortable coding for yourself.

  • Group messaging creating a new thread with no one listed in the To: field

    Recently I have had issues with group text where I send a message to an exiting group text thread in the messaging app, and when someone responds from that thread Messages creates a new thread with no apparent sender or anyone listed in the To: field of that message.  Has anyone had or scene this issue?  So far the only solution I have found is to delete both the new thread and the old thread and start the group over again, losing all the group text history from the original thread.   

    Texts are a carrier function
    Are all your group members on iMessage?

  • How can I create a new thread to run PulseOutput.VI

    Hi:
      I use NI-94729(cDAQ system) to generate pluse and want to output  pulse continuously and to check the pulse is 500Hz.
      In TestStand, the steps as follow:
      1: Call PulseOuput.vi to generate 500Hz pulse, VI use Finite Mode to generate pulse.
      2: Verify the pulse is 500Hz.
     Howerver, after the first step finishes, the pulse output stops, te 2nd step is failed. If a Continuous Mode is used in PulseOuput.vi to generate pluse, the 1st step can't finish.
    Thanks a lot!

    Hello MotionBoy,
    There are two ways to go about creating a new thread to run a step.  The first is to create a new sequence, into which you put the LabVIEW step you want to run and any other steps that may go along with it.  Then use a sequence call step to call this newly created sequence.  Set the Execution Options of the Sequence call step to 'Use New Thread.'  This will allow you to run a set of steps in a new thread, not just a VI.  The second method, which is only available for a LabVIEW VI, is to use the “Run VI Asynchronously” step.  This can be accessed if you right-click within your sequence and select Insert Step » LabVIEW Utility » Run VI Asynchronously.  This step will allow you to call a VI and have it automatically open in a new thread.  You can further customize this step by opening the configuration menu in the Step Settings.
    To address the current behavior of your steps I would like to know if the modules in steps 1 & 2 pass data between them or it would be desirable for them to do so?  If so you are going to need a more complex synchronization structure such as TestStand/LabVIEW queues. There is a simple example you may want to look at in the TestStand examples, under the Synchronization folder that demonstrates how to use queues. Otherwise the above solution should be all you need.
    John B.
    Applications Engineer
    National Instruments

  • Why does Pages keep creating a new folder everytime I save?

    There must be some easy explanation for this but there's a weird quirk in Pages '09 that I don't know how to turn off.
    Every time I save a document, not only does it save, but it creates a new folder with some new files labeled buildVersionHistory.plist and index.xml and then a subfolder called Quicklook within which there's a thumbnail.jpg.
    No idea why it's doing this but it's really clogging up my folders and it seems totally unnecessary. Can anybody help me turn it off?

    Hi Michael
    Welcome to the forum.
    Do you have Stuffit installed and are saving to the desktop?
    Because in that case it is Stuffit decompressing the Pages document's package.
    Just save to your document folder.
    Peter

  • How to create a new thread/TimerTask in oc4j 10.1.2

    Hi,
    I want to create a TimerTask / Thread in oc4j 10.1.2 so its ejb2.0 no Timer Beans.
    I know its not good to create my own custom TimerTask/Threads inside a container, so i looked and i saw that oc4j 10.1.2 has the notion of "2.9.2 Thread Pool Settings" however this refers only to:
    cite:
    +"The worker thread pool contains worker threads used in processing RMI , HTTP and AJP requests, as well as MDB listener threads. These are process-intensive and use database resources. "+
    but i dont do any rmi/http/ajp/mdb i just want a simple java TimerTask or a Thread.
    Can anyone assist me how to achieve this creating of timerTask / threads with oc4j 10.1.2 ejb2.0?
    Thanks

    Hi
    Since the error points to the unavailability of the driver class,can you double check your library claspath entries again.
    I just tried a DB2 connection using the following properties and the connection went through fine:
    Driver class name: com.oracle.ias.jdbc.db2.DB2Driver
    URL: jdbc:merant:db2://<host_name>:50000;DatabaseName=SAMPLE
    Thanks
    Prasanth

  • How does Mountain Lion create a new mailbox?

    I cannot create a new mailbox in Mountain Lion with either + or menu. Hints welcome.

    I never did find a mailbox - I wasn't even able to name or position it. I finally quite Mail and restarted. For whatever reason, I was able to create a new mailbox. Thanks for your response, it encouraged me to look and try again.

  • I group messaged from my ipad and this has screwed up the way my messages are reveived by my friends (it creates new threads in their phones with my email in place of my contact name) I've stopped messaging from my ipad but the problem remains. Any help?

    I have an iPhone 4S and use the group texting feature ALL THE TIME. I recently updated my iPad to the latest software and made the colossal mistake of continuing my group messaging from my iPad while connected to wifi. Doing this has successfully screwed but every group text thread I am in, to the point where its very hard for those involved in the thread to keep up. When I initially messaged those I was already engaged in text threads with it created a new thread in their phones replacing my name in their phones with my email. At first this was not a big deal but ever since then the people I am messaging have become increasingly frustrated with how my messages come through. If I am messaged in a group text and respond to it, sometimes when I respond it will create an entirely different thread in my recipients phones. So at that point they have to switch threads in order to read what I wrote. The new thread that my phone creates will send the message under my email not my name (related to the contact they have me saved as in their phones). The worst part about it is that there seems to be no rhyme or reason to why or when my phone will send the message as normal or under my email like it did with my iPad. I haven’t messaged from my iPad since these problems immediately began a month ago but the issues still continue. I have tried everything to get this to stop, I’ve turned off my wifi, I’ve had my friends delete the threads that my messages create in their phones. I’ve had them delete my email in their contact lists and nothing has worked. Can you help me? Any info you could provide would be greatly appreciated.
    Note: My phone message no different whatsoever. All the threads have remained the same. The issue is what it is doing to the people that I am messaging.
        Best Regards
             Rick Mulhern
    Message was edited by: Rickapplehelp19

    I have this identical problem.  For a while my group texts didnt show up on my ipad.  Then one day they did, maybe everyone in the group started using the same os version or something.  Ever since my first reply to the group there have been complaints of multiple threads.  I can not find a pattern for when my group text's decide they want to create a new thread. (it doesnt happen every time)  Everyone in the group has deleted the thread, we've all toggled imessage on/off etc.  There still hasn't been a solution.
    Any help would be appreciated.
    Thanks

  • Creating Threads : New thread doesn't run( )

    Hello !
    Can anyone please check the error in this code. It does not start the new thread.
    God bless you.
    NADEEM.
    // Create a second thread
    class NewThread implements Runnable {
      Thread t ;
      NewThread() {
      try {
       t = new Thread(this.t , "New Thread");           // Create a new, second thread.
       System.out.println("Child Thread : " + t);
       t.start();                                        // start the thread.
       }catch (IllegalThreadStateException e) {
         System.out.println("Exception : " + e);
      //Entry point for the second thread.
      public void run() {
       try {
        for(int i = 5; i > 0; i--) {
        System.out.println("Child Thread  : " + i);
        Thread.sleep(500);
       }catch (InterruptedException e) {
         System.out.println("Child Thread interrupted ");
       System.out.println("Exiting Child Thread... ");
    class CreatingThread {
    public static void main(String args[]) {
       new NewThread();    // Create a new Thread
       try {
        for(int i = 5; i > 0; i--) {
         System.out.println("Main Thread : " + i);
         Thread.sleep(1000);
       } catch (InterruptedException e) {
         System.out.println("Main Thread interrupted ");
       System.out.println("Exiting main thread ");

    are you sure Nadeem...i compiled and ran the below code and it works as you designed it...what errors do u get when u try to compile?...
    class NewThread implements Runnable {
      Thread t ;
      NewThread() {
      try {
       t = new Thread(this , "New Thread");           // Create a new, second thread.
       System.out.println("Child Thread : " + t);
       t.start();                                        // start the thread.
       }catch (IllegalThreadStateException e) {
         System.out.println("Exception : " + e);
      //Entry point for the second thread.
      public void run() {
       try {
        for(int i = 5; i > 0; i--) {
        System.out.println("Child Thread  : " + i);
        Thread.sleep(500);
       }catch (InterruptedException e) {
         System.out.println("Child Thread interrupted ");
       System.out.println("Exiting Child Thread... ");
    class CreatingThread {
    public static void main(String args[]) {
       new NewThread();    // Create a new Thread
       try {
        for(int i = 5; i > 0; i--) {
         System.out.println("Main Thread : " + i);
         Thread.sleep(1000);
       } catch (InterruptedException e) {
         System.out.println("Main Thread interrupted ");
       System.out.println("Exiting main thread ");
    }

  • How can I create a new Question thread?

    How to create a new "Question Thread" regarding the account payment ?

    Hello MotionBoy,
    There are two ways to go about creating a new thread to run a step.  The first is to create a new sequence, into which you put the LabVIEW step you want to run and any other steps that may go along with it.  Then use a sequence call step to call this newly created sequence.  Set the Execution Options of the Sequence call step to 'Use New Thread.'  This will allow you to run a set of steps in a new thread, not just a VI.  The second method, which is only available for a LabVIEW VI, is to use the “Run VI Asynchronously” step.  This can be accessed if you right-click within your sequence and select Insert Step » LabVIEW Utility » Run VI Asynchronously.  This step will allow you to call a VI and have it automatically open in a new thread.  You can further customize this step by opening the configuration menu in the Step Settings.
    To address the current behavior of your steps I would like to know if the modules in steps 1 & 2 pass data between them or it would be desirable for them to do so?  If so you are going to need a more complex synchronization structure such as TestStand/LabVIEW queues. There is a simple example you may want to look at in the TestStand examples, under the Synchronization folder that demonstrates how to use queues. Otherwise the above solution should be all you need.
    John B.
    Applications Engineer
    National Instruments

  • Jdbc driver creates new thread for each statement with a query timeout set

    I am profiling a web application that is using the Microsoft JDBC driver, version 1.1 to connect to a sql server 2005 database. Each java.sql.Statement that is created, within the application, gets a query timeout value set on it ( statement.setQueryTimeout(...) ).
    I have discovered that the JDBC driver creates a new thread to monitor each Statement and the query timeout value. When the application is under load these threads are getting created faster then they are being destroyed and I am concerned that this will cause a performance problem in production.
    One option I have is to remove the query timeout value and the monitor threads will not be created, another is to change JDBC drivers.
    I'm curious is there any way to control this behavior so that these threads are not created or are managed more efficiently.  Is there a workaround that anyone is aware of?   Is this considered a bug?
    I have found a similar bug here for the 2000 driver:
    http://support.microsoft.com/default.aspx/kb/894552
    Cheers

    Hi,
    Thank you for using the Microsoft SQL Server JDBC driver.  You are correct that a new thread is started to monitor the query timeout when a statement is executed.  This is a potential performance issue that we may look at addressing in the upcoming v1.2 release.  The current behavior is not configurable.  The only workaround with the v1.1 driver is to limit your use of query timeouts to only those statements which you reasonably might expect to actually time out.
    We do take customer feedback very seriously, so if anyone else is concerned about this particular issue, please chime in and we will be able to give it appropriate weight.
    --David Olix [MSFT]

Maybe you are looking for