title: JDateChooser setDate call ends execution unexpectedly
body: <p>I am using Toeder <code>JDateChooser</code> in my stand-alone Java application as seen in the code snippet below. The purpose here is:</p>
  
  <ol>
  <li>To shift the the calendar instance to a desired week of the year and then</li>
  <li>To set the start-date and the end-date of the desired week accordingly. These dates are kept in two JDateChooser instances, namely <code>jDateChooserBookBegin</code> and <code>jDateChooserBookEnd</code>.</li>
  </ol>
  
  
  
  <pre><code>Calendar c = Calendar.getInstance();
  int currentWeekOfYear = c.get(Calendar.WEEK_OF_YEAR);
  int desiredWeekOfYear = jComboBookWeekMainPanel.getSelectedIndex() + 1;
  c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek());
  
  for (int i = currentWeekOfYear; i &lt; desiredWeekOfYear; i++) {
      c.add(Calendar.DAY_OF_WEEK, 7); //e.g. set to next Monday
  }
  jDateChooserBookBegin.setDate(c.getTime()); // ***** HERE *****
  
  c.add(Calendar.DAY_OF_WEEK, 6); //set to the end of week e.g. Sunday
  jDateChooserBookEnd.setDate(c.getTime());
  </code></pre>
  
  <p>Problem: Let's say the above snippet is executed within a method. I checked the code in debug mode in neatbeans and I swear when the execution reaches the line marked with a dashed arrow, the rest of the lines are not executed at all and the encapsulating method returns immediately to the caller. This causes <code>jDateChooserBookEnd</code> not to be set to the proper date and my program behaves in an undesired fashion as a result.</p>
  
  <p>Question: Why does the <code>setDate</code> method of the <code>JDateChooser</code> class cause the rest of the lines not to be executed by returning to the caller? Is there a known bug on this? Do you have any clue? This looks rather impossible but it's happening. I am using Java 6.</p>
  
  <hr>
  
  <p>The full method content is available below. The above snippet is a simplified version of what you see below. In the program, I have two jButtons named next week and previous week. Whenever one of these buttons is clicked the relevant actionPerformed method makes a call to the below method. </p>
  
  <pre><code>private void update_DateFieldsInMainPanel() { 
      Calendar c = Calendar.getInstance();
      int currentWeekOfYear = c.get(Calendar.WEEK_OF_YEAR); 
      int desiredWeekOfYear = jComboBookWeekMainPanel.getSelectedIndex() + 1;             c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek()); 
  
      if (desiredWeekOfYear ==currentWeekOfYear) {                             
          jDateChooserBokMainFrom.setDate(c.getTime());        
          c.add(Calendar.DAY_OF_WEEK, 6); 
          jDateChooserBokMainTill.setDate(c.getTime());   
      } 
      else if (desiredWeekOfYear &gt; currentWeekOfYear) { 
          for (int i = currentWeekOfYear; i &lt; desiredWeekOfYear; i++) { 
              c.add(Calendar.DAY_OF_WEEK, 7); 
          } 
          jDateChooserBokMainFrom.setDate(c.getTime()); 
          c.add(Calendar.DAY_OF_WEEK, 6); 
          jDateChooserBokMainTill.setDate(c.getTime()); 
      }
      else { 
          for (int i = currentWeekOfYear; i &gt; desiredWeekOfYear; i--) { 
              c.add(Calendar.DAY_OF_WEEK, -7); 
          }
          jDateChooserBokMainFrom.setDate(c.getTime());   
          c.add(Calendar.DAY_OF_WEEK, 6); 
          jDateChooserBokMainTill.setDate(c.getTime());  
      }
  }
  </code></pre>