All GUI toolkits on Python are a wrapper around C/C++ code. On Java there a some "pure" Java toolkits like Swing, but a the lowest level they depend on C code to do the drawing and handle user input. There's no special support for things like graphics in the Java VM.
As for how the GUI gets rendered at the lowest level, it depends. On Windows, user mode software isn't allowed direct access the video hardware. Ultimately any C/C++ GUI code has to go through either GDI or Direct3D to do the rendering. The kernel mode GDI code is able to do all the rendering itself by writing to the framebuffer, but also supports acceleration by passing operations to display driver. On the other hand, the Direct3D kernel code passes pretty much everything to the driver which in turn passes everything on to the GPU. Almost all of the kernel mode code is written in C, while code running on the GPU is a mixture of hand coded assembly from and code written in higher level shading languages.
Note that GPU assembly language is very different from Intel x86 assembly language, and varies considerably between manufacturers and GPU generations.
I'm not sure what current practice is on Linux and other Unix type operating systems, but it used to be common to give the X server, which is a user mode process, direct access to the framebuffer. C code in the X server was ultimately responsible for rendering. Presumably this has changed at least somewhat now that GPU acceleration is more common.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…