/* * Don't need to implement this method unless your table's data can * change. */ @Override public void setValueAt(Object value, int row, int col) { Relationship neighbour = (Relationship) getValueAt(0, 0); double offset = col == 1 ? Double.parseDouble(((String) value)) : Double.parseDouble(((String) getValueAt(0, 1))); String fwdDefault = Math.max(offset, current.getForwardDefault()) + ""; if (neighbour.equals(Relationship.FORWARD)) { if (col == 0) { setValueAt(fwdDefault, 0, 1); fireTableChanged(null); } else { value = fwdDefault; } } super.setValueAt(value, row, col); }