It's an irrelevant technology that's arrived 5 years too late. World+dog is moving to HTML5+Canvas/WebGL+JS for that sort of thing, with tools to write boilerplate crap and APIs and frameworks to do the heavy lifting for you.

If you want to write games, and use Java, then basically you use LWJGL (or JogAMP if your bread is buttered that side) and be able and willing to use the powers it gives you; otherwise you're simply wasting your time and should probably use some other technology. Or of course you're writing for Android but that's not Java, right ?

I have been, I just don't care They totally missed the boat. JavaScript performance may suck right now but it's only about as slow as Java was back in 1998 and it's only going to get faster and faster. Waving my magic wand in the air I predict that in the next 3 years it's probably going to get another 3-4x faster.

JavaScript is still the diseased imagining of Satan though and I wish it would go away and DIAF but there we go, that's the power of the herd mentality for ya.

Ehh the game I am making in Java2D is performing well. (well as long as you don't have integrated Graphics chip) but java2D is still slow as shit when compared to other stuff available.

JavaFX seems really nice and all but like other have said, too little too late.

In all honesty, when it comes to browser base games (things you don't have to launch from desktop) flash is the mega ultra boss. Almost, every *fun* game I have played that is browser based is made in flash. Recently, there have been others such as unity and some java stuff but the best is still flash.

When you think JFX dont just think browser, its actually good for desktop too. Bottom line its a graphics engine for Java. Its fast, deep, and fun to use. Every time I think about implementing something sure enough there is a class or method to do it. It has nothign to do with x-years too late. Its here now and its powerful.

Not trying to be rude but if it is so powerful, please show me some of these boss things it can do that others, here right now, can't.

And I am not just talking browser. The fact is, with bindings to openGL, just about anything else that does not have similar binding is slower. If there is a class that will let you load shaders and use them, then I will be impressed. Thing is, it seems to be a fast java2D which is great and all but is out classed by all the other options out there. This is probably why not a lot of people use it.

Hm, when you think about it in terms of a replacement (or at the least) an alternative to Swing for making more interesting GUIs it's actually pretty neat. Thing is... Swing is actually really rather good. If you've ever coded in any other UI framework ever, you'll realise just how good. So I do hope they don't ditch swing in favour of JavaFX but instead concentrate on growing both techs and aiming them each more specifically at the sorts of things that they're best at.

Swing isn't being killed off, but it'll be purely in maintenance mode while JavaFX gets all the new features. It's hard to argue that Swing hasn't been in maintenance mode anyway for the last 8 years or so. Getting generic model classes has been just about the only decent thing to happen with it lately, and how long did that take after generics had first landed in 1.5?

I dunno... beyond that all it was really majorly missing was a modern HTML component and maybe one or two other utility components like treetables. It was otherwise sort of complete.

Cas :

I kind of miss JavaFX' CSS stuff in Swing nowadays, but I suppose functionally you can do about anything with plain swing.Some kind of docking framework as part of standard Swing would have been nice.Or Vsync'ed updates.

Swing is incredibly flexible and extensible -- overall it's a very well designed API. With that said, it fails on a few fronts:

You need to ship the JRE with your application.

JVM startup time is slow.

The look and feel does not match the operating system. (e.g. The filechooser... oh god.)

The 21st century is "going mobile" -- today's rich UI applications are being built on the web with HTML5. e.g. Google Docs is making software like MS Office obsolete.

From my understanding JavaFX is not going to overcome the above issues, and so it too will fail for GUI development in the long run.

If you really want a "smooth" software experience, use something like Qt (PyQ is awesome). If you want to develop applications "for the future," you should be targeting HTML5. If you just want to make a simple GUI application with a language you already know, continue using Swing or JavaFX.

I agree that desktop applications are getting less and less relevant, but the browser isn't going to replace them completely any time soon.For a lot of applications, it simply doesn't make that much sense to run them on 'the cloud' (god I hate that term) and seeing Java is still a hugely popular platform there will still be a place for Swing and JavaFX.

EDIT:"The look and feel does not match the operating system. (e.g. The filechooser... oh god.)"The same thing can be said for Google Chrome. Or any HTML5 front-end for that matter. Personally I think there has been put too much importance in this argument over the years.

If you want to develop applications "for the future," you should be targeting HTML5.

Oh no, the future will be extremely slow with HTML5, 2 FPS to display a teapot with an Nvidia Quadro FX 5000 (able to treat about 1 billion triangles per second) even with the latest driver and the latest stable version of Mozilla Firefox... I prefer Java

I use Swing, SWT and Eclipse RCP every day, I don't think it is just good for the trash bin.

And also, the native L&F of Swing very, very closely matches that of the OS. Well, Windows, anyway. Close enough that I don't care. Then again I like to switch to a custom L&F anyway.

... the JVM seems to start up pretty quickly for me, too. At least so quick that I don't notice it being slow.

... and I don't think MS Office will be going anywhere anytime soon with risible offerings such as Google Docs to compete with it. MS Office has only got to worry about OpenOffice or LibreOffice in reality.

If you want to develop applications "for the future," you should be targeting HTML5.

For me the thing is, developing for "the future" is almost as bad as developing for the past. You will still have the same problem that your applications are not quite in sync with the present.Case in point: Apple didn't really want a native SDK when they released the first iPhone because the vision was that iPhone apps would be cloud/HTML5 apps. Yet here we are; Apple still released their SDK and native iOS apps make billions.

Let's just take HTML5 for what it is: A great progression of HTML4. Nothing less, nothing more.

But when you require the user to interact with their operating system, as is the case with file choosers, it should behave as natively as possible. I cringe every time I use an application with a custom file chooser (i.e. any Swing application).

Quote

Oh no, the future will be extremely slow with HTML5, 2 FPS to display a teapot with an Nvidia Quadro FX 5000 (able to treat about 1 billion triangles per second) even with the latest driver and the latest stable version of Mozilla Firefox... I prefer Java

Call me a visionary... but I suspect we'll see some performance increases in the next few years.

Besides, we're talking about GUI applications, not hardware accelerated real-time 3D rendering. (And, for the record, generally a 3D teapot in HTML5/WebGL will blow Swing/JavaFX out of the water.)

Quote

And also, the native L&F of Swing very, very closely matches that of the OS. Well, Windows, anyway. Close enough that I don't care. Then again I like to switch to a custom L&F anyway.

I agree that Swing doesn't look so bad on Windows. On Mac, though, the difference between native apps and Swing apps is night and day. File chooser being one of my biggest irks.

Quote

... the JVM seems to start up pretty quickly for me, too. At least so quick that I don't notice it being slow.

I've been working with PyQt a lot, and I've been very impressed by its "responsiveness." Double-clicking a PyQt application opens the GUI immediately (even though the code is interpreted and the GUI is generated using a "ui" file). Whereas all of the Swing apps I've tried on Windows and Mac have a short delay after double-clicking the JAR.

This might be a Swing startup issue rather than a JVM startup issue. Or maybe I'm just crazy...

So generally you'd agree a Swing GUI (or any other non-native GUI) isn't a problem too in itself.JFileChooser is a bit of a corner-case in my opinion. Yes, JFileChooser sort of sucks, but you hardly ever see one. And if you consider we'll be saving our stuff more and more often on the web anyway, this will become even less of an issue.

Quote

This might be a Swing startup issue rather than a JVM startup issue. Or maybe I'm just crazy...

Quote

Call me a visionary... but I suspect we'll see some performance increases in the next few years.

Yes, Java/Swing applications start up slower. But QT nor Python is going to solve that if these applications are java for good reasons (like NetBeans, Eclipse or JVisualVM).And besides, on my new laptop that has a nice and fast SSD, java startup-time isn't really an issue anymore. These performance increases you talk about work for java too, you know

Oh no, the future will be extremely slow with HTML5, 2 FPS to display a teapot with an Nvidia Quadro FX 5000 (able to treat about 1 billion triangles per second) even with the latest driver and the latest stable version of Mozilla Firefox... I prefer Java

Call me a visionary... but I suspect we'll see some performance increases in the next few years.

Besides, we're talking about GUI applications, not hardware accelerated real-time 3D rendering. (And, for the record, generally a 3D teapot in HTML5/WebGL will blow Swing/JavaFX out of the water.)

I don't call you a visionary, you're as blind as those bloggers who write ultra-indulgent articles about HTML5 and WebGL. I already explained that HTML5 canvas and WebGL are still slow on lots of machines, the latter is tricky to use except with Google Chrome (I cannot use it anymore with Chromium), even the software rendering is dead slow, I get only between 5 and 15 FPS with "Runestone Defense" (which is a quite good game) just to see tens of sprites. We have been waiting for these performance increases for years, come down to Earth. Java is not perfect but it is a mature platform. I agree with Erikd, see HTML5 as an evolution of HTML4, not something miraculous. If you don't like JFileChooser, use AWT FileDialog.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org