7 ms·
Good luck getting that Swing app to look nice, though. Which is a breeze with HTML/CSS.
by efdee 7y ago
Good luck getting that Swing app to look nice, though. Which is a breeze with HTML/CSS.
- thesuperbigfrog 7y agoCustomizing the appearance is one place where Swing's age shows. It is possible to create a custom "Look and Feel", but it is not as easy as HTML / CSS: https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/ https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/ JavaFX does allow CSS to be used to style it: https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/css_tutorial.htm https://docs.oracle.com/javase/8/javafx/user-interface-tutor...
- Crinus 7y agoI remember >10 years ago there used to be some "plaf" libraries that provided very easy themeing abilities for Swing that even came with a WYSIWYG tool to create themes. It is a shame something like that never became part of Swing itself and instead you have to create tons of classes just for a theme.
- pjmlp 7y agoOr actually buy them. http://www.jgoodies.com/ http://www.jgoodies.com/ is still in business, to give a possible example.
- Crinus 7y agoThis doesn't fix the issue of Swing theming being hard. The fix would be to make it much easier, preferably with a visual editor.
- pjmlp 7y agoYou mean like Netbeans Matisse, or more like actually having a designer on the team?
- Crinus 7y agoI was talking about themes, not UI design. Think GTK themes (though not their implementation), not where buttons in a form will go.
- pjmlp 7y ago"How to design a modern Java Swing UI inspiration using Netbeans" https://www.youtube.com/watch?v=SpKANTHXwmo https://www.youtube.com/watch?v=SpKANTHXwmo As mentioned, having a designer on the team matters.
- Crinus 7y agoI wasn't talking about such a thing. I was talking about being able to create a "plaf" theme using a visual editor or at least some rules in CSS or similar script that applies to the entire Swing application (like Swing's own plafs do) and doesn't require creating subclasses. This has nothing to do with having a designer or not and it is orthogonal to it (you can give the tool/rules/whatever to a designer if you want).
- tannhaeuser 7y agoSwing can look fantastic if you put in the effort as IntelliJ (based on Swing) shows. I'm not necessarily an IDE guy, but good luck with getting that kind of functionality with JS on Electron even remotely.
- efdee 7y agoI wouldn't say IntelliJ's stuff looks -good-. It's a lot more workable than most Swing apps but it's still a long way from looking "good". That said I haven't touched their IDEs in 2 years so maybe something changed.
- jen20 7y agoI'd say IntelliJ looks like it belongs on the platform it is run on - which I'll take any day over some over-designed cross-platform 'styling'.
- Crinus 7y agoThe problem with Swing theming is that you need to create a ton of classes "just" for theming your application. I did that years ago myself, but really Swing should have something like those libraries released years (>10) ago that had a bunch of premade themes as well as WYSIWYG editors for them. There used to be many libraries (most of them were awful, half of them tried to mimic circa 2002 Mac OS X Aqua) so i do not remember any names, though i remember trying one with a visual editor that i gave to a designer at the place i worked at. We didn't ended up using it though because of the price.
- pjmlp 7y agoNot only it is a breeze, after reading books like "Filthy Rich Clients", I have full control over hardware acceleration instead of playing CSS tricks with Z ordering in the vain hope that the browser will do the right thing. Lack of design skills doesn't improve just because one changes UI stack.