public native capture(filename as String) as Void throws IOException
Captures the current window client area into a BMP image.
The capture uses the same offscreen Painter replay pipeline as the native window backend; it does not invoke an external screenshot tool and does not include operating-system window decorations.