title: JTable Key Listener
body: <p>I need my JTable to validate a given row's data and change column1's component to a JButton, labelled "Save" (ready for record save), if the validation determines that the data is OK. I need to do this in reaction to each keystroke.</p>
  
  <p>No matter how many things I have tried, the user seems to be forced to close the cell editor (by clicking elsewhere or pressing Enter) before the data can be evaluated.</p>
  
  <p>Do you know of a way of having a key listener (or other method) that will provide instant feedback rather than forcing this extra key/mouse stroke?</p>
  
  <p>Data valuation using the DefaultCellEditor still needs this extra keystroke and KeyBindings (which apparently doesn't) seems to need to react to specific keys only.</p>
  
  <p>Is there a way to provide a listener that will react instantly to each keystroke in the editor?</p>
  
  <h2>Follow up from question by m0skit0</h2>
  
  <p>Q: What have I tried?</p>
  
  <p>A: I have a class called ButtonColumn, adapted from <a href="https://tips4java.wordpress.com/2009/07/12/table-button-column" rel="nofollow">Rob Camick</a> which mplements TableCellRenderer. </p>
  
  <p>This validates the row data and, if validation succeeds it renders the cell as a JButton labelled “Save”, ELSE it returns the theDefaultRendererComponent with the plain text label “New…” (in red font).</p>
  
  <p>I have another class that implements KeyListener which repaint the table every time the user makes a keystroke and thus carries out the SaveButtonRowFormatter validation and rendering (as described above).</p>
  
  <p>This works but only after the cell editor of has been closed. This is the problem: the user must do the work of closing the editor in order for the table to be rendered and the save button to appear. This is not intuitive as there is no obvious reason why the user would make any keystroke after they are sure they have successfully filled in the record. Without any save button at this point they are stuck</p>