Author: mallon Date: 2012-08-07 15:33:19 +0200 (Tue, 07 Aug 2012) New Revision: 3570 Url: http://chorem.org/repositories/revision/lima/3570 Log: refs #699 Il existait aussi une erreur concernant l'utilisation de la touche entree en fin de tableau. Lors de l utilisation de celle-ci, la selection reste donc bien sur la derniere ligne, sans generer d erreur. Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2012-08-07 12:57:47 UTC (rev 3569) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2012-08-07 13:33:19 UTC (rev 3570) @@ -68,6 +68,8 @@ /** serialVersionUID. */ private static final long serialVersionUID = 3133690382049594727L; + private static final Log log = LogFactory.getLog(FinancialTransactionTable.class); + protected FinancialTransactionViewHandler handler; private int x_tab; @@ -190,8 +192,9 @@ * last row*/ if (e.getKeyCode() == KeyEvent.VK_ENTER){ int selectedRow = table.getSelectedRow(); - if(selectedRow != table.getRowCount()){ - table.setRowSelectionInterval(selectedRow+1, selectedRow+1); + if( selectedRow == table.getRowCount()-1){ + /*-2, cause we have a row count beginning at one and we want to back to the line before*/ + table.setRowSelectionInterval(table.getRowCount()-2, table.getRowCount()-2); } else { table.setRowSelectionInterval(selectedRow, selectedRow); }