4 ms·
> 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
by jjoonathan 5y ago
> 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
- victor106 5y agohttps://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/...
- Macha 5y agoSwing'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.
- cosmotic 5y agoSome of those dialogs are indeed not great and a weak point. There are a few options to get a native picker though.
- shannah78 5y agoThe 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.
- speedgoose 5y agoIt was not impressive when this documentation was written, but it's for sure not impressive today.
- cosmotic 5y agoCertainly 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.
- marwis 5y agoWindows 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.
- morelisp 5y ago> 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.
- pjmlp 5y agoNo they aren't, provided that the developers actually bother to read books like "Filthy Rich Clients". https://www.amazon.com/Filthy-Rich-Clients-Developing-Applications/dp/0132413930 https://www.amazon.com/Filthy-Rich-Clients-Developing-Applic...