Colleagues, good afternoon. Advise whether you should use Java Swing in new projects now. The project is already being written, but it will be rewritten in the near future, probably all in JavaFX. Now in general in the Java world, many changes are happening, even JavaFX want to cut out from Java SE, the fate of these technologies in the future is not clear.
1 answer
Anyone who distributes this bike about cutting out JavaFX, you need to hammer a nail into your head! Now there is a process of modularization of the standard library. So that in the future, programmers could supply with an application a compact version of a virtual machine with the minimum required set of libraries. As part of this process, JavaFX was rendered into a separate module. Just like for example JAXB - tools for working with XML and JSON. In one of the following versions, Swing will be moved to a separate module.
In fact, the question is: Swing is quite suitable and sufficient for developing programs with a windowed graphical interface, so there is no reason to rush to rewrite existing code in JavaFX. But for new projects, you should prefer a more modern and more functional JavaFX library.
- Do you have experience with Swing? I wanted to collect different opinions, especially those who somehow use Swing / JavaFX in projects to make sure Swing is alive. With a quick search in search engines for Swing, it is often written that Swing is very outdated, dead, and stuff like that. Nevertheless, the current project has a fairly high-quality architecture, Swing + Spring + JPA + MVC + Maven, and a fairly convenient way to create a GUI using the Netbeans IDE toolkit. - zuvladimir pm
- There is. The fact that Swing is dead must be reported to the guys from JetBrains, otherwise they write to it the world-famous IDE and do not know. - Sergey Gornostaev
- Yes, Idea and Netbeans are written in Swing, but these are already historical projects, there is a large code base from which it is difficult and not reasonable to leave. Or maybe JavaFX, although not so young, but more raw than Swing, you need to find out from the developers. What is worrying is, for the most part, the release of new operating systems, new versions of JRE, and the lack of support for Swing applications. Oracle seems to be planning to release new versions of the JDK every half year, Java 11 will be released this fall, and my thick Swing client for Java 8 will become obsolete exponentially from new technologies) - zuvladimir