Replace string concatenation in loop with StringBuilder
This commit is contained in:
@@ -262,13 +262,13 @@ public final class StatusPanel extends JComponent
|
|||||||
*/
|
*/
|
||||||
private void updateStatusLabel()
|
private void updateStatusLabel()
|
||||||
{
|
{
|
||||||
String status = _status;
|
StringBuilder status = new StringBuilder(_status);
|
||||||
if (!_displayError) {
|
if (!_displayError) {
|
||||||
for (int ii = 0; ii < _statusDots; ii++) {
|
for (int ii = 0; ii < _statusDots; ii++) {
|
||||||
status += " .";
|
status.append(" .");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_newlab = createLabel(status, new Color(_ifc.statusText, true));
|
_newlab = createLabel(status.toString(), new Color(_ifc.statusText, true));
|
||||||
// set the width of the label to the width specified
|
// set the width of the label to the width specified
|
||||||
int width = _ifc.status.width;
|
int width = _ifc.status.width;
|
||||||
if (width == 0) {
|
if (width == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user