protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		if (pixels != null) {
			Rectangle bounds = g.getClipBounds();
			for (int i = bounds.x; i < bounds.x + bounds.width; i++) {
				for (int j = bounds.y; j < bounds.y + bounds.height; j++) {
					try {
						g.setColor(pixels[i][j]);
						g.fillRect(i, j, 1, 1);
					} catch (ArrayIndexOutOfBoundsException e) {
						e.printStackTrace();
					}
				}
			}
		}
	}