svoid testDirectlyPaintingOnJComponent() { int w = 256, h = w; var c = //jcenteredlabel("Bla"); new JComponent {}; setOpaqueBackground(Color.white, c); jMinSize(c, w, h); var it = WeightlessShuffledIteratorWithSeed(virtualList(w*h, i -> pt(i%w, i/w))); new Var g; awtEvery(c, 10, -> { if (!g.has()) { g.set((Graphics2D) c.getGraphics()); if (!g.has()) ret; } repeat 100 { if (!it.hasNext()) { if (done.raise()) print("Done painting pixels"); break; } var p = it.next(); //print(+p); setPixel(g!, p, Color.black); } }); showFrame(c); }