Re: Help on Cocoa Class references
Re: Help on Cocoa Class references
- Subject: Re: Help on Cocoa Class references
- From: Marco Frisan <email@hidden>
- Date: Wed, 19 Jan 2011 02:07:54 +0100
On Tue, 18 Jan 2011 10:49:25 -0800 (PST), Leanne Attard wrote:
> i did that just by chance the problem is that clicking on the title bar is being detected but everyone else is not detected
Java events should be handled within Java code. In normal cases you should not need to implement your own Cocoa component inheriting from NSView. You can handle the events inside the window frame, through the Java APIs inside java.awt.event package.
Though, your case seems special case. I think you are using something like CocoaComponent from java.eawt.event package. To handle it you must read carefully the CocoaComponent reference and the Technical Note TN2147, since they explain all the work that is needed to manage the 2 different event threads (1 for Cocoa and 1 for AWT).
Finally, if your goal is simply to take advantage of OpenGL in a Java application I suggest you to use LWJGL (www.lwjgl.org) a "ready for use" Java to OpenGL binding that use JNI to call OpenGL native functions and works on Windows, Linux and Mac OS X.
If you don't mind to code using OpenGL low level functions, but your goal is only to code a 3D Java application, that is based on OpenGL, you can use jMonkeyEngine (www.jmonkeyengine.com). It is an advanced 3D framework based on LWJGL.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden