Change this
TableColumn col5 = jTable1.getColumnModel().getColumn(4);
to
final TableColumn col5 = jTable1.getColumnModel().getColumn(4);
You are defining an anonymous class. To avoid strange side-effects with closures in java variables must be marked as final.