Getting java applications to look native on windows - how?

前端 未结 8 2293
悲哀的现实
悲哀的现实 2021-02-08 03:13

Is it possible to use Java to create apps that look native on Windows? I don\'t care if the solution is portable or not, because I only plan to target windows users. I am using

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-08 03:19

    You'd do something like:

    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    

    (Which of course works only on Windows.) The result looks and feels reasonably native. More info e.g. here.

提交回复
热议问题