r/learnjava • • Jun 13 '22

Java User Interface Frameworks

At my university, we have worked with JavaFX which is quite dated as a UI framework for Java, but somehow manages to still be good enough for the simple applications we’ve been building.

I wanna however, move to a more viable framework, but I have no idea what I could use to build a UI in Java other than Swing (which tbh, is no different from JavaFX).

What frameworks are out there that I could use to build a UI? Are there any good resources you know? Any tip is appreciated

0 Upvotes

13 comments sorted by

View all comments

4

u/HecknChonker Jun 13 '22

I'm not aware of any decent alternatives. In most cases java is used as a backend service that supports a UI written in JavaScript. Java based UI frameworks just haven't gotten the same level of support over the years.

The only places I'm really aware of that are using java to build UIs are universities and colleges. I've never seen it used in any corporate environments, and it's usually large corporations that are helping to fund development of the language which might explain why FX has stagnated over the years.

This is just my perspective though, and there might be things I'm just not aware of.

2

u/morbie5 Jun 13 '22

So is java really ever used for PC based applications anymore? I think the only app written in java on my PC is jdownloader 2, and im not even sure if that is still written in java.

3

u/pragmos Jun 13 '22

All of the popular Java IDEs to this date (IntelliJ IDEA, NetBeans, Eclipse) are built in Java.

I also had a big client that offered a desktop application built with Swing as part of their package suite. In the corporate world, Java UI is still a thing, but because it's proprietary software and focused on niche real-world applications, we don't hear about it often.

1

u/HecknChonker Jun 13 '22

Do you know if IDEA built on java FX? Or is it using something more custom?

3

u/pragmos Jun 13 '22

Swing, albeit with a very customized style, that's why it looks so good. You can find the source code of the Community Edition on Jet Brains' GitHub if you're interested.

1

u/3portas Jun 14 '22

There is a lot of financial enterprises using swing in my country. The reason they gave me is to minimize the latency between UI and backend, because they need to get information the most real-time possible, and perform operations real fast too. Besides very specific use cases, I've only worked with swing on legacy code.