Java AWT Native Interface: Difference between revisions

Content deleted Content added
Article contains a walkthrough, see WP:NOT; needs clean-up
Line 1:
{{howto|date=May 2008}}
'''Java AWT Native Interface''' is an interface for the [[Java (programming language)|Java programming language]] that enables [[render]]ing [[library (computer science)|libraries]] compiled to [[native code]] to draw directly to a Java [[Abstract Window Toolkit]] (AWT) {{Javadoc:SE|java/awt|Canvas}} [[object (computer science)|object]] drawing surface.
 
Line 155 ⟶ 156:
 
== Native painting ==
{{cleanup-section|date=May 2008}}
 
As you can see, you can paint as if it is a native application. In [[Microsoft Windows|Windows]], the JVM will pass a HWND and other window information to your native application so that your application will "know" where to draw. In this example, it uses GDI to draw a Rectangle. The window information your native side need will be in a <code>JAWT_Win32DrawingSurfaceInfo</code> structure (depending on [[Operating System]]) which can be retrieved with this line: