title: JTable enter key
body: <p>I am developing an application using <code>jTable</code> for inventory management.</p>
  
  <p>The action is, by typing the item code in a <code>jTextField</code> and by pressing <kbd>Enter</kbd> key, the details of that code should come to <code>jTable</code>. And there I have to type the quantity and press <kbd>Enter</kbd> to calculate the amount. But now by giving item code the details come to the <code>jTable</code>, and I can type the quantity, but there by pressing <kbd>Enter</kbd> key <code>jTable</code> focus goes to the next row and no calculation is being done. But by again pressing <kbd>Enter</kbd> key on the <code>jTextField</code> the last entered amount is getting calculated. I don't know how to solve this problem as I am a beginner in Java. I am using MySQL and Java in Netbeans.</p>
  
  <p>I am giving that code below..</p>
  
  <p>Thank You..</p>
  
  <pre><code>jTable1.editCellAt(serialNumber, 2);
  jTable1.getCellSelectionEnabled();
  
  value1 = new Double(jTable1.getValueAt(serialNumber, 2).toString());
  value = new Double(jTable1.getValueAt(serialNumber, 3).toString());
  double result = value1 * value;
  
  jTable1.setValueAt(result, serialNumber, 4);
  </code></pre>