Cocoa and standard Java
Cocoa and standard Java
- Subject: Cocoa and standard Java
- From: Phillip McKerrow <email@hidden>
- Date: Fri, 14 Mar 2003 14:42:39 +1100
Hi,
Is it possible to build interfaces for Java applications that use awt
or swing with Interface builder? Apple claim to be committed to
standards, so I reasoned that their software tools may reflect that
commitment. I built a simple Cocoa for Java application to
investigate. What I found is that even simple things like text fields
are different. For example
Cocoa Java declares a text field as follows:
public NSTextField textField; //Cocoa NS classes
while in standard Java it is declared as follows:
public TextField textField = new TextField(); /* IBOutlet */
Also they use different functions to access the text field
textField.setIntValue(x); //Cocoa NS classes
and
textField.setText(String.valueOf(x));
As a result, trying to replace the Cocoa for Java declaration with
standard Java declarations results in exceptions. So it appears that
the two are not very compatible. I could be wrong, but Cocoa Java
looks like a set of Java calls to C functions and hence one would have
to think like a C programmer to use them, not like a Java programmer.
I am teaching Java and QuickTime for Java on Macintosh platforms, and I
am looking for a GUI tool like interface builder for use by my
students. Project Builder works fine, so I was hoping that Interface
builder might too. Can anyone suggest a suitable tool - preferably a
low cost one?
Even though we are doing some development in Cocoa Java, the option of
teaching the non standard Cocoa Java NS classes is not attractive:
1. students want to learn standard Java as they perceive that it leads
to jobs and so we need to teach them awt and swing
2. teaching an additional proprietry api is not possible in the time
available - we already teach QuickTime for Java
3. students are keen to learn software that is cross platform and
conforms to standards
What I need is an integrated environment where I can teach standard
Java, QuickTime for Java and GL4Java (installs and seems to work well
under OSX) that includes and IDE (project builder) and and interface
design tool (which I hoped would be interface builder).
Phillip
----------------------------------------------------------------------
Phillip McKerrow
http://www.itacs.uow.edu.au/people/phillip
School of Information Technology and Computer Science
University of Wollongong *
Northfields Avenue, * *
Wollongong, NSW, 2522. +
AUSTRALIA * the land of the southern cross
tel : +61 2 4221 3771 fax : +61 2 4221 4170
God so loved the world that he gave his one and only Son (Jesus),
that whoever believes in him shall not perish but have eternal life.
John 3:16
----------------------------------------------------------------------
_______________________________________________
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.