Can we develop very good looking UI in swing and if not what are alternatives

前端 未结 6 726
既然无缘
既然无缘 2021-01-30 18:04

In my current project we have to develop a good looking desktop based application in java.

Currently, we have a very basic desktop application written in swing and team

6条回答
  •  -上瘾入骨i
    2021-01-30 18:39

    From you answer its not very clear what your problem is. A simple, but often sufficent solution is to change the look and feel for you application to the Systems default look an feel (so Swing looks just like a native application). All you need to do is insert the following code somewhere before any of your UI is created/shown (if you don't know where, place it as the first in your main-method):

    try {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
    // exit application, log  or ignore exception
    }
    

提交回复
热议问题