src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java

Print this page
rev 10520 : 8055723[client]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

*** 2228,2242 **** for (int row = 0; row < rows.length; row++) { htmlStr.append("<tr>\n"); for (int col = 0; col < cols.length; col++) { Object obj = table.getValueAt(rows[row], cols[col]); String val = ((obj == null) ? "" : obj.toString()); ! plainStr.append(val + "\t"); ! htmlStr.append(" <td>" + val + "</td>\n"); } // we want a newline at the end of each line and not a tab ! plainStr.deleteCharAt(plainStr.length() - 1).append("\n"); htmlStr.append("</tr>\n"); } // remove the last newline plainStr.deleteCharAt(plainStr.length() - 1); --- 2228,2242 ---- for (int row = 0; row < rows.length; row++) { htmlStr.append("<tr>\n"); for (int col = 0; col < cols.length; col++) { Object obj = table.getValueAt(rows[row], cols[col]); String val = ((obj == null) ? "" : obj.toString()); ! plainStr.append(val).append('\t'); ! htmlStr.append(" <td>").append(val).append("</td>\n"); } // we want a newline at the end of each line and not a tab ! plainStr.deleteCharAt(plainStr.length() - 1).append('\n'); htmlStr.append("</tr>\n"); } // remove the last newline plainStr.deleteCharAt(plainStr.length() - 1);