Does Java allow native user interface widgets on Mac OS X?

If I write an application in java, does it use native widgets if they run on Mac OS X? Or does he use "prominent" widgets provided by java runtime?

Thanks.

+7
java native macos
source share
3 answers

You can use SWT , which uses OS X's own controls in OS X, but also remains multi-platform (assuming the platform has a SWT library compiled for it). However, this is not as flexible or will look as good as direct access to user interface components (an abstraction needs to be done).

alt text

You can also see MacWidgets that try to look like OS X's own widgets, but are not, but the cross-platform works.

alt text http://exploding-pixels.com/google_code/graphics/MailSourceListWithControlBar-selection.png

+5
source share

Yes. Apple provides a version of jvm that uses its own widgets.

developer.apple.com/business/macmarket/tekadence.html

Benefits Apple Java implementation includes access to Aqua user interface elements “for free” through Swing, native proactive multitasking, multi-processor support (without the need for additional coding), and processing JAR files as shared libraries. This latest advancement improves execution speed and reduces RAM for applications that rely on the same archive, such as applications in packages. In addition, Mac OS X plugs the Java windowing tool directly into the Massive Window Toolbox, which gives Java applications and applets the performance benefits of Quartz graphics, one of three powerful graphics technologies in Mac OS X.

+2
source share

All Java Swing components are alike, not native widgets .

The Swing configuration is the result of choosing not to use the native GUI tools for Windows to display itself. Swing “paints” its control tools programmatically using the Java 2D API, rather than invoking the user interface toolkit.

There is an OSX look provided by Apple's JVM, but it is never full-scale control. Another approach is SWT , but I honestly have not seen many applications besides Eclipse use it, and I never found that they look very good.

0
source share

All Articles