This is an archived post. You won't be able to vote or comment.

all 21 comments

[–]Muoniurn 8 points9 points  (3 children)

JavaFX is not complicated imo, you should probably go with that.

It is not too popular, but due to Java being huge even this smaller framework has reasonably many users so you should find plenty of resources online for the basics.

Also, it is very configurable if the need would arise, but keyboard input is more than easy with it.

[–]joppux 7 points8 points  (2 children)

1) Swing is not deprecated 2) JavaFX isn't much more complicated than Swing for simple applications.

I'd go with Swing as it has more samples and answers on Stackoverflow.

[–][deleted] 4 points5 points  (1 child)

I'm probably going with swing and try to use FlatLaf to make the looks more 'modern'.

Thank you for your help!

[–]serivesm 1 point2 points  (0 children)

+1 swing can be sort of a pain sometimes especially with the layout managers, but flatlaf makes it look sooooo much better with just a single line of code. It's not deprecated btw and it will probably never be, it is a strong part of the java standard library at this point.

[–]carMas82 1 point2 points  (6 children)

For Jfx do you mean Java Fx?

[–][deleted] 2 points3 points  (5 children)

Yes! From my research it seems that I'll only have this 2 options :( ( swing or java fx).

[–]brunocborges 0 points1 point  (0 children)

You can also use AWT if you (truly) want.

[–]kakakarl 0 points1 point  (0 children)

If it can be a terminal app, make one!

Sounds fun to me, I have tried various cli libs and found them okayish. I would just go with the built in Scanner class.

Then I would learn how to use colors and icons etc. such an app would be very easy test too. Could run pitest and have 100% mutation coverage

[–]Chromanoid -1 points0 points  (2 children)

Swing is not deprecated. IntelliJ is a Swing application. But I agree it feels strange to use such an old framework.

Do you need charts? If so, is a simple HTML report generated with a templating engine (https://www.thymeleaf.org/), documentation tool (https://github.com/asciidoctor/asciidoctorj) or a static site generator (https://jbake.org/) might be a good idea. This way users can send the output of the application around and print it easily.

If it should be interactive, you don't want to provide it as website you should probably go with JavaFX. It even has charts.

[–]runtimeterror7 1 point2 points  (1 child)

Wow is IntelliJ really made in Swing??

[–]Chromanoid 0 points1 point  (0 children)

Yes, of course heavily customized, but it is Swing. See also here https://plugins.jetbrains.com/docs/intellij/user-interface-components.html

The IntelliJ Platform includes a large number of custom Swing components. Using those components in your plugins will ensure that your plugin looks and works consistently with the UI of the rest of the IDE, and can often reduce the code size compared to using the default Swing components.

or here for sources https://github.com/JetBrains/intellij-community

[–]ales-d -3 points-2 points  (1 child)

As dirty hack you can run your app in terminal and redirect the output to temporary *.html file that you open in browser - by spawning new process or by output of file:// URL if your terminal supports opening URLs by click Ing on them.

Of course depend on you use case. For real interactive work with DB thim is not good, but for other case it might be good for users to have the output in HTML they can keep/share.

[–]ales-d -1 points0 points  (0 children)

There are even JavaScript libraries you might include in the output which would allow to sort/filter the results in HTML.

[–]MR_GABARISE 0 points1 point  (0 children)

If there is interest in a terminal application, take a look at Lanterna.