JNI: invoke java dialog with native callback: store native function address in java, and invoke native another method to this function. key points: 1.Store callback function pointer(address) in java: to support multiple calls, use data block for each…
控制台程序. 为了可以选择系统支持的字体,我们定义了一个FontDialog类: // Class to define a dialog to choose a font import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; import static Constants.SketcherConstants.*; @SuppressWarnings("serial…