Native Rendering

Native rendering uses native code to render images of native UI components. Native rendering provides accurate images of native UI components because it uses the same code to create the images that the native UI components use to display themselves.

The alternative to native rendering is simulated rendering, which attempts to duplicate the appearance of native UI components using images and/or graphics operations. Simulated rendering is unlikely to be fully accurate. Furthermore, the images and graphics code must be updated for each release of the platform to track any changes in the platform UI. As the renderer may run on multiple platform releases, it must contain the images and graphics code for each supported platform. Native rendering avoids most of this duplication, since the native code is always the appropriate code for the platform where the library is running. The disadvantage is that native rendering is not capable of supporting cross-platform rendering, i.e., running on one platform but rendering in the style of another.

Native rendering may have limitations based on the ability of native code to render UI components as images. Although macOS provides good support for rendering Cocoa views into images, that support has gaps that must be filled using simulated rendering. For this and other reasons, the Java Native Rendering library is not guaranteed to perform properly without change on future releases of macOS.