!7 module PaintMyself > DynSingleFunction { void doIt { swing { Container frame = dm_frame(); int w = getWidth(frame), h = getHeight(frame); BufferedImage img = newBufferedImage(w, h); frame.paint(createGraphics(img)); showImage("Painted myself!", img); } } }