@Override
public void initialize() {
add(getPrimarySurface());
getPrimarySurface().fillBackground(KnownColor.BLACK);
Rectangle rectangle = new Rectangle(0, 0, 50, 50);
for (KnownColor c : KnownColor.getKnownColors()) {
getPrimarySurface().setFillStyle(c).fillRectangle(rectangle);
if (rectangle.getX() < WIDTH - rectangle.getWidth()) {
rectangle.setX(rectangle.getX() + rectangle.getWidth());
} else {
rectangle.setX(0);
rectangle.setY(rectangle.getY() + rectangle.getHeight());
}
}
}