An extract on #awt
The Abstract Window Toolkit, part of the Java programming language
Antony Worrall Thompson, the British chef
Aphrodite World Tour, a 2011 concert tour by Australian pop/dance singer Kylie Minogue
Armathwaite railway station, England; National Rail station code AWT
Airborne wind turbine, a concept design wind turbine
Withholding tax, Automatic Withholding Tax (also known as WHT)
Advanced World Transport, Czech cargo railway operator
Alternative Waste Treatment, a subset of waste treatment. List of solid waste treatment technologies
The Java Native Interface (JNI) enabled developers to add platform-dependent functionality to Java applications. The JNI enables developers to add time-critical operations like mathematical calculations and 3D rendering. Previously, native 3D rendering was a problem because the native code didn't have access to the graphic context. The AWT Native Interface is designed to give developers access to an AWT Canvas for direct drawing by native code. In fact, the Java 3D API extension to the standard Java SE JDK relies heavily on the AWT Native Interface to render 3D objects in Java. The AWT Native Interface is very similar to the JNI, and, the steps are, in fact, the same as those of the JNI. See the Java Native Interface article for an explanation of the JNI techniques employed by the AWT Native Interface.
The AWT Native Interface was added to the Java platform with the J2SE 1.3 ("Kestrel") version.
See the Java Native Interface article for an explanation of the native keyword and the loadLibrary() method. A paint() method will be simply invoked when the AWT event dispatching thread "repaints" the screen.
Type this in a file named "NativeSideCanvas.cpp" and compile into a library. See Java Native Interface (JNI) for a more complete explanation. (For Solaris code and other operating systems see links below.)
One should run the file as usual. One should then see a window with, for example, a rectangle drawn in it. (See Java Native Interface for complete instructions.)
Note: One can notice that the AWT Native Interface requires the "jawt.dll" (or "jawt.so") to run with the application, so the easiest way to do that is copying the "jawt.dll" (should be in the .../jre/bin file path of the JDK's installation path.)