Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public void setValueAt(Object value, int row, int col) {
  2. boolean change = false;
  3. if (value != null) {
  4. values[row][col] = (String) value;
  5. String temp = (String) value;
  6. temp = temp.replaceAll(" ", "");
  7. String str = match(temp, row, col);
  8. if (!str.equals(strings[row][col])) {
  9. strings[row][col] = match(temp, row, col);
  10. change = true;
  11. }
  12. }
  13.  
  14. if (change) {
  15. for (int i = 0; i < row; ++i) {
  16. for (int j = 0; j < columns; ++j) {
  17. setValueAt(values[i][j], i, j);
  18. }
  19. }
  20. }
  21. fireTableCellUpdated(row, col);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement