Next Page > Hide TOC

Legacy Documentclose button

Important: The Java API for Cocoa is deprecated in Mac OS X version 10.4 and later. You should use the Objective-C API instead. For a tutorial on using Cocoa with Objective-C, see Cocoa Application Tutorial.

Introduction to Cocoa Tutorial for Java Programmers

Important: The Java API for Cocoa is deprecated in Mac OS X version 10.4 and later. You should use the Objective-C API instead. For a tutorial on using Cocoa with Objective-C, see Cocoa Application Tutorial.

This document introduces the Cocoa application environment using the Java language and teaches you how to leverage Apple’s development tools to build robust, object-oriented applications. Cocoa provides the best way to build modern, multimedia-rich, object-oriented applications for consumers and enterprise customers alike. This document assumes you are familiar with Java programming but does not assume you have previous experience with Cocoa or Xcode Tools.

This document is intended for Java programmers interested in developing Cocoa applications. Keep in mind, however, that Java is not Cocoa’s native language. To develop Cocoa applications that you intend to release to end users, you must use Objective-C. No Java interfaces for new Cocoa features will be added to Mac OS X versions after 10.4. Therefore, features added to Cocoa in subsequent versions Mac OS X will not be available to Cocoa applications developed using Java.

This document shows how to build Currency Converter, an application that converts a dollar amount to an amount in another currency, given the rate of that currency relative to the dollar. The main window of the finished application is shown in Figure I-1.


Figure I-1  The Currency Converter main window


Currency Converter is a simple application, yet it exemplifies much of what software development with Cocoa is all about. As you’ll discover, Currency Converter is amazingly easy to create, and it’s equally amazing how many features you get “for free”—as with all Cocoa applications.

This document leads you through the basic steps for creating a Cocoa application. It shows how to:

By following the instructions provided in this document, you familiarize yourself with the two most important applications used for developing Mac OS X applications: Interface Builder and Xcode. You also learn the typical workflow of Cocoa application development:

  1. Designing the application (your brain)

  2. Creating the project (Xcode)

  3. Creating the user interface (Interface Builder)

  4. Defining the classes that implement the application’s functionality (Interface Builder)

  5. Implementing the application’s functionality (Xcode)

  6. Building the application (Xcode)

  7. Running and testing the application (Xcode)

Contents:

Organization of This Document
See Also


Organization of This Document

This document consists of the following chapters:

This document also contains a revision history.

See Also

These documents provide detailed information on Cocoa development:



Next Page > Hide TOC


© 2002, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-10-03)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.