@Override public void run() { try { for (MatrixGUIObject matrixGuiObject : list) { if (!matrixGuiObject.isIconUpToDate()) { matrixGuiObject.setIconUpToDate(true); BufferedImage image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_RGB); MatrixHeatmapRenderer.paintMatrix(image.getGraphics(), matrixGuiObject, 16, 16, 0, 0); matrixGuiObject.setIcon(image); } } } catch (ConcurrentModificationException e) { // no problem, retry later } } }