title: Java JTable TableModel addRow no change
body: <p>I have more of a problem than a question and hope you can help me find possible reasons for this.</p>
  
  <p>In a very simple <code>JTable</code>, where I use the <code>DefaultTableModel</code>. I add a row programmatically during the runtime like this:</p>
  
  <pre><code>public void Update(String neu) {
      System.out.println(model.getDataVector());
  
      model.addRow(new String[] {neu});
  
      System.out.println(model.getDataVector());
  }
  </code></pre>
  
  <p>The System-Prints are only a debugging measure for me to realize more.
  Whenever this method runs, I actually add something to the <code>TableModel</code> (prove due to the out.prints)</p>
  
  <p>But the change is not permanent. Neither do I see a change in my table, nor is the "new value" part of the <code>TableModel</code> the next time the method Update is called.</p>
  
  <p>What could be the reason?</p>
  
  <p><strong>Edit1:</strong> Sadly I cannot make a code snippet small enough to be posted here and yet contain the error. I would highly appreciate it however if you guys could give me some hints in generall what might cause the abovementioned behaviour.</p>
  
  <p><strong>EDIT2:</strong> I have build a workaround in my code. Somehow the problem seemed to be caused by using two different frames for this operation (one frame to ask for the value and the second frame to use and display this value)</p>
  
  <p>I replaced one frame with a JDialog and now the TableModel updates correctly. I do not know what the problem with using two frames was, but at least I have my code working again. Thank you for your help!</p>