Does anyone know if font rendering on Linux respects the OS hinting settings? I've long wanted to create GUI apps in Java, but stayed away because the font rendering was what I consider ugly.
I don't use Netbeans and to some extent IDEA just because the fonts don't look right. Tons of work went into the font rendering of Windows and OSX/macOS. Java apps that use the Java font rendering bypass all that work look like horse-shit.
True Type Fonts need a little VM in them for processing hints that was patented by Apple. FreeType got around this issue by implementing automatic hinting instead of executing the manual hints.
Windows simply acquired a proper license for TTF rendering. I think these patents caused issues for Swing. The Java font rendering in Swing components was 100% Java and did not use any of the OS font rendering. IIRC these patents have long expired so I don't see why the fonts couldn't look better. I only do Java on the backend so I have no idea how Java guis look these days.
This was only an issue for those that are ideologically against installing Sun/Oracle's JDK versions or any other commercial JDK like IBM's, as the rendering code was never part of OpenJDK, hence why InteliJ started bundling their own variant of OpenJDK.
Meanwhile with the transition to OpenJDK as official JDK the code has been merged into OpenJDK.
I highly recommend checking out Gerrit Grunwald's work in JavaFX he has made some very nice JavaFX based controls which you an checkout on github[0], there are also demos on his youtube channel[1].
Now that Oracle has withdrawn resources from the project, I wonder what its future is going to be.
I was really hoping it would become a Swing replacement, but so far there are still too many unfilled gaps for it to replace our (fairly extensive) production usage of Swing.
> The recommended workaround is to use the Xorg server instead of the Wayland server when running JavaFX applications. Note that Wayland is not supported by JDK 10 or JDK 11.
Even with the switch to GTK 3, there's no native Wayland support? WTF
These apps have had a lot of time put into their design–it's not just "we slapped Cocoa on this and now it's beautiful". Native apps being better is selection bias, since people who spend time on design aren't going to settle for Java messing up the UI or UX–so they just all use AppKit.
That's not exactly true or those people won't settle for Electron either. Obviously that's not the case and I wonder why. Is it just that Electron apps are easier to do, native apps look and feel better, so JavaFX is a sort of no man's land?
The point of Java on the desktop was cross-platform compatibility, but electron now occupies that same space — and decent JS developers are cheaper and easier to find than decent Java-desktop developers.
If cross-platform support is not a requirement, desktop Java is not even in the running.
DSTE and Gluon Maps look great there, but I didn't find actual artifacts to play with. The app I was able to find (https://github.com/RohitAwate/Everest) has a very poor scrolling behavior on MacOS and generally seems pretty simplistic compared to its Electron counterparts.
If I want to build fully custom GUI is it better to start at Swing(Learning from book: Filthy Rich Client)? or JavaFX has made it easier to build custom GUI components.
Wait, wasn't JavaFX dead? Or maybe that was just webstart? I just seem to recall looking.. A year ? Back and not finding any recommended, "this will continue to work" gui for Java?
If i remember correctly, webstart has been deprecated together with pretty much anything that had anything to do with browsers and plugins. JavaFX is a bit more generic in its applications, I believe (not really my field of expertise).
Note that webstart is plugin less for quite a long time. The java installer registers a mime type. This way the browser simply offers to open (or save) the startup file, using the default save dialog, with the webstart executable.
Harsh but fair. I've been doing java for about 25 years and consider myself an expert in that language. I know absolutely nobody that does desktop applications in Java these days (swing or javafx) at this point and that has been true for well over a decade. I get approached by recruiters for lots of shit I would never do but Java desktop aint one of those things. The last time I did anything swing related must have been 15 years ago and it was a questionable choice then already. The only popular swing applications I know of are developer tools like intellij. I've never encountered anything javafx in the wild.
Hi, there are a few things I have wanted to ask from someone who is working with Java professionally as it is the programming language I know best (for context: I am a student who will be graduating in a year).
What is Java still being used for? is it mostly Spring work and Android apps or are there still other use cases?
What do you use Java for? or What is the nature of work that you do which makes use of Java?
It would be very helpful if you could answer these.
As someone else who uses java professionally a lot, let me weigh in.
Most large services are backed by web servers in the backend. What do you imagine most people use for web/http servers? Java. What other language can you use? C++? Large scale services are too error prone, especially if not maintained by experienced devs and besides, no one codes restful services in C++. NodeJS? It's weakly typed and is javascript. I know it's really popular but rarely used in large backends not fronting a UI.
Not a legacy language it is just that the trend has been to use electron for x-platform desktop apps instead of something a bit more reasonable like Java.
I am trying to build a desktop app with lots of custom GUI components, involves custom GUI component/event + drag and drop. I am fairly proficient in Java and I think Swing would good option for me to start building the app. Currently I am reading "Filthy Rich Client". I have not investigated into JavaFX yet. I know for desktop C++/Qt is a better solution, but I don't want to go back to C++ and because i don't feel comfortable the language features and it's tool chain. I like the Java ecosystem, and I think I will be more productive in Java/Swing.
Do you have any suggestion for building desktop app with custom GUI? Should I avoid working with Swing? What other language/framework combination do you think a better fit for the project?
It was marketed for a long time to use primarily for Java applets. Moreover, it was marketed as if "old sucking java applets was replaced with javafx", in reality it replaced Swing in applets, not applets. Then, for some period of time, it was marketed as kiosks platform.
I didn't know that it's just a GUI toolkit until recent time when someone told me so. Its website still not says anything sane, what it is. "client application platform for desktop, mobile and embedded systems built on Java". Well, Java itself is application platform for desktop and whatever apps.
No. AIR was a runtime for desktop environments. You could implement standalone applications (and mobile apps) with it. I also worked on a few embedded systems which utilized a user-interface on top of Flash/Flex/AIR.
As far as I can recall it was pretty good, and mostly fun to work with. The framework was quite powerful, and allowed us to write lots of highly interactive code in a short timeframe. At that point of time (maybe 2011?), it was far ahead of anything based on Javascript/HTML, and I think only more recently the more powerful web frameworks might have caught up.
I really enjoyed Flex and look back at it fondly, when I tried Angular 1 it felt like the first thing on the JS/HTML side that could come close to matching the productivity of Flex (albeit with no helpful IDE). It was good enough to whip out a MVP demo in 48 hours. I've mostly been out of UI development since, occasionally extending stuff written in a NIH corporate framework or some Backbone things. Occasional experiments with the ClojureScript tooling (Reagent-based) seem like the next way forward that maybe the rest of the world can use in another 5+ years.
2008~2011 timeline sounds spot on. We had an AIR app, which we started moving to web-based JavaScript around 2011ish I think. It was a lot of custom code; would have been a lot simpler now with something like Angular. And TypeScript would have been alike a chorus of angels.
If I'm not mistaken, JavaFX initially was planned to be a rich-gui-for-everything I think, it was supposed to be used in web applets, desktop and for mobile I think, the ground moved ahead of it way faster tho
That's how it was presented to me. AWT was platform dependent, so you'd get Windows/Mac/Linux-specific inputs like radio buttons when they were created. Swing changed Java's GUI development to be platform independent, making radio buttons appear the same across platforms. With the emergence of mobile devices, and therefore more rendering engines, JavaFX was introduced to to unify design across device (or become device independent).
That said, I suppose JavaFX never took off. I think it wasn't that people hated it, but that the people that would be the primary adopters had already built their applications in Swing or as Applets years/decades ago. JavaFX was an improvement, but convincing a company to change a mission critical GUI would be too costly to do. Coupled with how GUI education in CS is abysmal, everyone stuck with Swing because they didn't want to "learn a new thing they already hated".
EDIT: Why on earth would someone downvote this?