How can I create a “modern looking” Java desktop application?

后端 未结 9 1876
渐次进展
渐次进展 2021-01-30 08:40

Similar questions to this are asked periodically, but many of these answers are outdated.

I need to build a cross-platform desktop application in Java with a GUI of comp

相关标签:
9条回答
  • 2021-01-30 09:16

    Modern Javascript frameworks (ExtJS, Dojo, etc...) offer the same widgets richness or more (Excel like grids for instance), a wider variety of L&F and usually fit better with the OS of the user. Users are also very comfortable with their browsers and, hey, "modern stuff" is on the web, and the modern web today is HTML+Javascript.

    The overhead of converting an app to "web like" is minimal. An embedded Jetty can remain really small and disk space has become much less of an issue.

    There are additional benefits going down this route for the future evolutions of the application.

    • Suddenly, the desktop app becomes a server app, which can be accessed from another desktop. We were able top promote a desktop app to 'portal' in a matter of weeks.
    • Rewriting the app in terms of (Ajax) web services provides an easy transition to creating a full REST (or SOAP...) services stack. The app can then be integrated to other applications, easily monitored externally, etc...
    • Support of other devices (smart phones, tablets,...) becomes much easier, by concentrating on the UI layer only
    • As the app grows, separation of concerns is cleaner; developers working on the UI do not have to mess with low level code.
    • There are a lot of excellent JS/HTML designers and developers that do not program in Java.

    EDIT

    3 years later this has become extremely easy thanks to Electron

    0 讨论(0)
  • 2021-01-30 09:18

    I know this question is old, but if you don't want to use FX and still want to use Swing, then try MacWidgets, i've used it on a couple projects. It's very light, and looks great. Below is an old project i was working on, over time i've perfected using macwidgets and now use it internally in my company.

    http://www.digitalhand.net/projects/jdataanalyzer/mainGUI.png

    0 讨论(0)
  • 2021-01-30 09:21

    Swing is good (stable, documented, supported until 2026). The problem is that it relies on the LookAndFeel system that provide a very limited number of boilerplate choices. It should be easy to change the appearance of each component individually and then unleash its creativity. Unfortunately it is painful. IMHO frameworks should be built on top of Swing to make it possible instead of creating JavaFX.

    Take a look at https://github.com/dotxyteam/ReflectionUI.

    Ex GUI: http://javacollection.net/reflectionui/wp-content/uploads/2017/08/general.png

    0 讨论(0)
提交回复
热议问题