Reputation: 13642
I would like to implement Mac OS X native printing in my Java desktop application.
That is, this print dialog when the user chooses to print:
(source: blogcdn.com)
which then expands to a dialog such as this:
As I understand it, native Mac OS X applications can customise the 2nd dialog by adding an option in the lower drop-down ("TextEdit" in the screenshot) which when selected displays options specific to the application.
How is the best way to go about achieving this in my Java application? I presume I will need to write some Objective C to do what I need, then use JNA/JNI to call it? Are they are pre-existing libraries that can help me?
Upvotes: 4
Views: 1904
Reputation: 931
You are correct in think you need to go down the JNI route.
Apple has a tech note on developing JNI routines here: http://developer.apple.com/library/mac/#technotes/tn2147/_index.html
Upvotes: 1