Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

painting in Java to a (native) NSView possible?



Hi.

Is there a way to provide some kind of wrapper/bridge object in Java (via JNI) to a native NSView class so that I can make Java2D drawing calls to something like an "NSViewJComponent" from Java, treating it like a JComponent from within Java?

What I'm really trying to do is implement an NSStatusItem with a custom NSView, so I can draw, from within Java, an animated GIF, and provide a custom JPopupMenu. (I know how to do this as a pure Cocoa app, but I can't reliably pass the image that exists in Java as an Icon to Cocoa via JNI ((long story, different topic)). So If I can do the drawing in Java, that solves *that* particular problem.)

I looked at CocoaComponent, but that's for letting Cocoa draw into a component hosted in a Java view, so it's the opposite of what I need.

I haven't seen anything that makes me too hopeful that this is possible, but you never know until you ask. :)

Thanks,


Rob Ross, Lead Software Engineer
E! Networks
email@hidden
---------------------------------------------------
"Beware of he who would deny you access to information, for in his heart he dreams himself your master." -- Commissioner Pravin Lal



_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.