Does Java allow you to use native UI widgets on Mac OS X?

前端 未结 3 1418
感动是毒
感动是毒 2021-01-12 08:50

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

Thanks.

3条回答
  •  忘掉有多难
    2021-01-12 09:39

    You can use SWT which uses native OS X controls on OS X but also remains multi-platform (provided that platform has the SWT library compiled for it). However, it is not as flexible or will look as nice as having direct access to the UI components themselves (an abstraction has to be made).

    alt text

    You could also have a look at MacWidgets which attempt to be like native OS X widgets but aren't, but work cross-platform.


    (source: exploding-pixels.com)

提交回复
热议问题