News for hackers. Stuff that matters.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by gruez on Saturday October 07, 2017 @09:49PM (#15426623)
follow up question: why does swing use its own special snowflake design, when it could the OS's native design?
Re:Show HN: Hacker News desktop application in Kotlin/Swing by westoncb on Saturday October 07, 2017 @09:54PM (#15426632)
Swing uses a pluggable 'look and feel' system (essentially themes)—which does include a 'native' look and feel for various OSs, including Windows and macOS.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by hota_mazi on Saturday October 07, 2017 @11:55PM (#15426910)
Because Sun made the boneheaded decision (and never admitted it was dumb) to go for emulated widget controls instead of native ones. What this means is that they have had to reimplement and imitate the behavior of native controls on all platforms (realistically, Windows only) every time Microsoft came up with a new version.

In contrast, IBM took the native approach with SWT / JFace, and the interfaces written with that library look and feel infinitely more native and performant than Swing and JavaFX ever did and ever will.

Re:Show HN: Hacker News desktop application in Kotlin/Swing by lmz on Sunday October 08, 2017 @01:46AM (#15427117)
The toolkit based on native widgets existed before Swing. It was called AWT.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by n3dst4 on Sunday October 08, 2017 @06:44AM (#15427739)
AWT wasn't native either - it just had one ugly appearance and couldn't be themed. I seem to recall it kind of resembled Sun's CDE (Common Desktop Environment) so it would have look sort of at home on Solaris.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by pvg on Sunday October 08, 2017 @07:53AM (#15427871)
AWT uses native widgets.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by hota_mazi on Sunday October 08, 2017 @10:10AM (#15428256)
AWT isn't native, it uses peers.

The fact that Swing ended up being such a massive failure was in good parts due to the fact that Swing is built on top of AWT.

Re:Show HN: Hacker News desktop application in Kotlin/Swing by AnIdiotOnTheNet on Saturday October 07, 2017 @11:37PM (#15426870)
Consistent look & feel between platforms.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by hota_mazi on Saturday October 07, 2017 @11:53PM (#15426904)
Which means it sucks and looks weird on all platforms.

The story of Swing.

Re:Show HN: Hacker News desktop application in Kotlin/Swing by kuschku on Sunday October 08, 2017 @08:05AM (#15427900)
Or the story of Electron.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by AnIdiotOnTheNet on Sunday October 08, 2017 @12:06AM (#15426934)
Which do you care more about: it works, or it looks good? There's a reason Java became such a big platform for business applications and it isn't because it cared about fashion fads.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by hota_mazi on Sunday October 08, 2017 @12:29AM (#15426975)
> There's a reason Java became such a big platform for business applications and it isn't because it cared about fashion fads.

There's a reason why Java completely failed on the desktop: Swing.

> Which do you care more about: it works, or it looks good?

Both. I care about both. And you should too.

But Swing developers got used to only being able to have one. At most.

Re:Show HN: Hacker News desktop application in Kotlin/Swing by erikbye on Sunday October 08, 2017 @04:53AM (#15427494)
Completely failed? JetBrains' IDEs seem awfully popular, and they are all Java and Swing.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by hota_mazi on Sunday October 08, 2017 @10:09AM (#15428252)
Can you name another very popular and very good looking Swing application?

Even if you can, you can count them on one hand. Swing was a massive failure, and rightfully so, because Swing/JavaFX apps look, and more importantly, feel, like a broken mess.

In contrast, SWT/JFace apps look a lot more native and feel extremely snappy. Apps build on the Eclipse RCP are in general pretty decent looking and they enable all the native controls and functionalities of the host platform.

Re:Show HN: Hacker News desktop application in Kotlin/Swing by megaman22 on Sunday October 08, 2017 @08:50AM (#15428016)
Jetbrains IDEs could almost have an NCurses GUI, and they would be worth using. How pretty they are is mostly orthogonal.
Re:Show HN: Hacker News desktop application in Kotlin/Swing by AnIdiotOnTheNet on Sunday October 08, 2017 @08:55AM (#15428026)
> Both. I care about both. And you should too.

Why? What value is looking good? There's value in a well designed responsive UX, but how it looks is completely meaningless to me because it doesn't help me get shit done.

Re:Show HN: Hacker News desktop application in Kotlin/Swing by outworlder on Sunday October 08, 2017 @12:56AM (#15427030)
It is not only about looking good. Non-native widgets break user interaction is small but irritating ways.

If you are going for non-native widgets, they should at least look good. Otherwise you get the worst of both worlds.