Which Java UI framework provides Mac OSX 10.9 user experience on Windows 7/8? [closed]

跟風遠走 提交于 2019-12-25 18:51:51

问题


I would like to develop windows applications that has native Mac OSX 10.9 look and feel. Is it possible? In case no such framework is available, what alternatives are available? Can I use any open source UI assets to achieve Mac look and feel?


回答1:


I would like to develop windows applications that has native Mac OSX 10.9 look and feel.

Use this instead:

try {
    // Significantly improves the look of the output in each OS..
    // By making it look 'just like' all the other apps.
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch(Exception weTried) {
}

Note: It will not port the OS X look to Windows. But your users will thank you for that.

Can I use any open source UI assets to achieve Mac look and feel?

Nope. Apple would sue the pants off anyone who tried to replicate their look.




回答2:


Try using the method bellow. You won't be able to get a mac look and feel but there are a few you can try. I prefer the system default look and feel.

public static UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()

Returns an array of LookAndFeelInfos representing the LookAndFeel implementations currently available. The LookAndFeelInfo objects can be used by an application to construct a menu of look and feel options for the user, or to determine which look and feel to set at startup time. To avoid the penalty of creating numerous LookAndFeel objects, LookAndFeelInfo maintains the class name of the LookAndFeel class, not the actual LookAndFeel instance.

The following example illustrates setting the current look and feel from an instance of LookAndFeelInfo:

UIManager.setLookAndFeel(info.getClassName());



来源:https://stackoverflow.com/questions/20570598/which-java-ui-framework-provides-mac-osx-10-9-user-experience-on-windows-7-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!