Java AWT Native Interface: Difference between revisions

Content deleted Content added
Echawkes (talk | contribs)
m Correct name for AWT
Line 9:
 
Type in this in a .java file named JavaSideCanvas and compile:
<source lang="java">
 
import java.awt.*;
import java.awt.event.*;
Line 34:
}
}
</source>
 
See the [[Java Native Interface]] article for an explanation of the <code>native</code> [[keyword (computer programming)|keyword]] and the <code>loadLibrary()</code> method. The <code>paint()</code> method will be simply invoked when the AWT [[event dispatching thread]] "repaints" the screen.