package ru.nsu.ccfit.bogush.client.view;

import javax.swing.*;
import java.awt.*;

class ListElementRenderer extends DefaultListCellRenderer {
	private int width = super.getWidth();

	@Override
	public Component getListCellRendererComponent(JList list, Object value,
	                                              int index, boolean isSelected, boolean cellHasFocus) {
		String text = String.format("<html><body WIDTH=%d>%s", width, value.toString());
		return super.getListCellRendererComponent(list, text, index, isSelected, cellHasFocus);
	}

	void setWidth(int width) {
		this.width = width;
	}
}

@@ -137,16 +137,138 @@
 derer %7B%0A
+%09private static final String FORMAT =%0A%09%09%09%22%3Chtml%3E%22 +%0A%09%09%09%09%09%22%3Cbody WIDTH=%25d%3E%22 +%0A%09%09%09%09%09%09%09%22%25s%22 +%0A%09%09%09%09%09%22%3C/body%3E%22 +%0A%09%09%09%22%3C/html%3E%22;%0A
 %09private
@@ -519,33 +519,14 @@
 mat(
-%22%3Chtml%3E%3Cbody WIDTH=%25d%3E%25s%22
+FORMAT
 , wi

Make FORMAT constant field