News for hackers. Stuff that matters.
Re:The decline and fall of Java on the desktop by jjoonathan on Wednesday March 02, 2022 @02:05PM (#30531390)
> native-looking-and-feeling apps

Who are you kidding?

> (with some care)

No. Even if you were to give it more care than required to rewrite the GUI natively in each major platform, you still wouldn't be close.

Look, I get it, there are plenty of applications where a bit of clunk in the GUI is beneath other things on the priority list. That's fine. But the number of java devs who think clobbering together a few native widgets means they have constructed a native experience is... disconcertingly high. There's a whole GUI world out there beyond the lowest-common-denominator, and Swing isn't even the best at that.

Your priorities might still be perfectly rational. I might even make the same decisions under the same constraints. Just... be aware of what you're trading away

Re:The decline and fall of Java on the desktop by cosmotic on Wednesday March 02, 2022 @02:52PM (#30532062)
Certainly the default L&F is not native looking, nor are any of the popular community L&Fs. Though one can simply set the L&F to the native look and feel with essentially one line of code. The little care I'm referring to is around polish to get beyond the lowest-common-denominator. Regardless, system L&F with Swing is still worlds better than any Electron app, which is now a common technique to build cross platform apps.
Re:The decline and fall of Java on the desktop by marwis on Wednesday March 02, 2022 @03:45PM (#30532859)
Windows LnF hasn't looked native since WinXP and never felt native. Lots off things are off by few pixels, there are no animations or shadows, no context menus etc.

At least in Electron textboxes have standard context menu and drag and drop.

Re:The decline and fall of Java on the desktop by morelisp on Wednesday March 02, 2022 @02:53PM (#30532073)
> the number of java devs who think clobbering together a few native widgets means they have constructed a native experience is... disconcertingly high.

It's absolutely a psyop cover for the number of webkit-in-a-box projects that don't even bother with the first step. Normalized deviance.

Re:The decline and fall of Java on the desktop by pjmlp on Thursday March 03, 2022 @02:05AM (#30538025)
No they aren't, provided that the developers actually bother to read books like "Filthy Rich Clients".

https://www.amazon.com/Filthy-Rich-Clients-Developing-Applic...

Re:The decline and fall of Java on the desktop by victor106 on Wednesday March 02, 2022 @02:28PM (#30531712)
Re:The decline and fall of Java on the desktop by Macha on Wednesday March 02, 2022 @02:32PM (#30531766)
Swing's platform look and feel does not get a convincing native experience, as you'll find out the first time you open a JFileChooser on Mac and see a clone of the windows XP file picker with widgets made to look like mac OS widgets circa Snow Leopard.
Re:The decline and fall of Java on the desktop by shannah78 on Wednesday March 02, 2022 @03:19PM (#30532496)
The FileDialog is the only AWT widget I still use regularly. It gives you the native file chooser. Unfortunately it isn't terribly flexible when it comes to, for example, only selecting directories. In those cases, I have been known to use JNI to use the truly native dialog.
Re:The decline and fall of Java on the desktop by cosmotic on Wednesday March 02, 2022 @02:49PM (#30532009)
Some of those dialogs are indeed not great and a weak point. There are a few options to get a native picker though.
Re:The decline and fall of Java on the desktop by speedgoose on Wednesday March 02, 2022 @02:38PM (#30531849)
It was not impressive when this documentation was written, but it's for sure not impressive today.