Re: Java3D in cocoa
Re: Java3D in cocoa
- Subject: Re: Java3D in cocoa
- From: Marc Monticelli <email@hidden>
- Date: Tue, 25 Nov 2003 14:10:10 +0100
On 25 nov. 03, at 13:22, Matthew Cox wrote:
On Tuesday, November 25, 2003, at 06:03 AM, Marc Monticelli wrote:
Hi,
I develop in parallel an application with java/swing and with cocoa.
I'm probably going to get flamed for this, but why use Cocoa at all?
I'd suggest going Swing all the way. For one thing, developing one GUI
is a lot easier than developing two (even though both are easy to use,
there are going to be bug-hunts.) Secondly, it lets you concentrate
your efforts onto a single GUI. Thirdly as far as
support/documentation go, you'll have a single UI to deal with, not
two. Fourthly, smaller codebase. I'd evaluate your need for doing two
different GUIs.
In fact, the original app (simulation in physics/math) was developed in
Cocoa (Next->openstep->rhapsody->OSX) and use lot of cocoa stuff.
I've made a port of basic and gui API classes in Java for our students,
and I develop indifferently in cocoa and java. I've just to change the
syntax [object method] into object.method() like with cocoa/java.
So it's not a problem to maintain two version.
<OT>
NOW, to preemptively cut off some of the flak I'm going to get for
comparing Swing's ease of use to Cocoa. I like Interface builder too,
but if we did both GUI's strictly from code, java-style, there'd be
comparable levels of complexity. As for visual layout tools for Swing,
if you haven't used Netbeans, you don't know what you're missing.
Makes Java almost as easy as Cocoa, although, its still not quite as
intuitive.
</OT>
Now I have to develop 3D view, and I don't like to programming with
differents libraries, one for java (java3D), and an other for Cocoa
(OpenGL).
Again, try to stick to one library, it makes your life simpler for the
above reasons.
Is it possible ton integrate Java3D view inside a Cocoa program ?
Anything is POSSIBLE, for instance, all the electrons in your body
could spontaneously decide to jump to jupiter, but its exceedingly
unlikely. As for Java3D inside Cocoa, well, see below for my plan of
attack.
I know that it's possible to programming Cocoa in java, but the
inverse ?
Well, the issue will be trying to convince the Java3D to draw in the
cocoa window. Hopefully, its a post-JFC API, so it vends a subclass of
JPanel or something similar to draw itself. Anybody know if there's a
way to add a JPanel to an NSView? Perhaps some sort of JPanel-NSView
adaptor class?
Perhaps the solution is tu use OpenGL in java, but I didnt' find good
solution
GL4Java http://www.jausoft.com/gl4java.html is arguably as good as the
real thing. Its not quite up to date with the current API, but to be
honest, most of my stuff is only using OpenGL 1.2 API calls.
I will try it, it seems the solution for me. I've seen jogl also.
Good luck, Matt.
Thanks
...Marc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.