Merge pull request #2001 from draxdyn/fix_oobe

Fix ArrayIndexOutOfBoundsException in ButtonColumn.actionPerformed
This commit is contained in:
LevelX2 2016-06-17 13:45:03 +02:00 committed by GitHub
commit 84989973ed

View file

@ -111,7 +111,7 @@ public class ButtonColumn extends AbstractCellEditor implements TableCellRendere
@Override
public void actionPerformed(ActionEvent e) {
if (table.getRowCount() > 0 && table.getRowCount() >= table.getEditingRow()) {
if (table.getRowCount() > 0 && table.getRowCount() >= table.getEditingRow() && table.getEditingRow() >= 0) {
int row = table.convertRowIndexToModel(table.getEditingRow());
fireEditingStopped();
ActionEvent event = new ActionEvent(table, ActionEvent.ACTION_PERFORMED, "" + row);