Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I code applications on a Mac so that they use the native UI elements?

Tags:

macos

I'm starting to program. Already did some things with Java: a calculator, one document management system powered with a database and some other home projects. But I don't like the visual look. I love however how mi Mac's Apps look. And I want to create Apps for mac. Already buy one but when I open netbeans to program it looks like the Apps doesn't feel like mac.

Is there any specific java code to make the controls looks like how the other mac apps look? My dad mention something about Object C but I don't understand. Can someone please explain me.

like image 998
Angela V Avatar asked Jul 28 '11 01:07

Angela V


2 Answers

  1. AFAIK You'll never get the look and feel of Aqua (Mac's UI Kit) by using Java. Why? Because to make Java platform independent some things needs to get ripped off. And native controls are one of them.

  2. I think you're taking about Objective C which is the native development language for building Mac Apps. I'll recommend you the book "Learn Objective-C on the Mac" is pretty useful.

P.S. I'll encourage you to start with iOS (iPhone and iPad apps). Why? Well, I think is easier to begin with. Things like fixed resolution and so on make your development efforts small while beginning with. (Just my 2 cents)

like image 154
Erre Efe Avatar answered Oct 14 '22 15:10

Erre Efe


If you want to code in Objective-C, you'll first need to trek over to the App Store and download Xcode. This will install C/C++/Objective-C compilers on your Mac and then you can start getting your hands dirty.

Depending on what you are trying to accomplish, you can just google/read/learn and build your own frameworks from the ground up or look at something like Cocoa to get started as well.

http://developer.apple.com/technologies/mac/cocoa.html

Cocoa Frameworks The Cocoa frameworks consist of libraries, APIs, and runtimes that form the development layer for all of Mac OS X. By developing with Cocoa, you will be creating applications the same way Mac OS X itself is created. Your application will automatically inherit the great behaviors and appearances of Mac OS X, with full access to the underlying power of the UNIX operating system. Using Cocoa with the Xcode IDE is simply the best way to create native Mac applications.

Good luck!

like image 43
afuzzyllama Avatar answered Oct 14 '22 15:10

afuzzyllama