Yakov Fain's Blog

My notes about everything in IT

Java Swing Has to be Deprecated

with 74 comments

Every time I start teaching my new Java class I’m looking at the Swing units in the manual asking myself, “Why my students need to know Swing framework?” Well, I need to teach them how to program GUI, event listeners, asynchronous worker threads and event loop that are pretty much the same in every programming language that deals with UI. My students create applets and test them in appletviewer, then they are going through hard times trying to run them in Web browsers… In the end, I tell them that they won’t be going doing Swing programming in the real world projects. I also tell them that if Amazon.com would decide to re-write their UI in Java they’d be out of business in no time.

If not with Swing framework, how should my Java students learn GUI programming? There is another Oracle product called JavaFX. It’s a better looking wrapper for Swing. It still runs on JVM, so Amazon would go out of business as quickly as with Swing, but at least with a better looking UI.

Java developers look down at the HTML/JavaScript crowd. Yes, programming in JavaScript is not as productive as in Java, but HTML5 applications usually look nice. HTML5 developers know that having a Web designer producing professionally looking CSS is a must. Whereas Swing components are ugly by default. They are so last century.

Recently I was attending a presentation on a particular Eclipse plugin that could produce Web reports. The speaker was using Twitter API to demonstrate how easy it was to generate a report finding tweets based on a certain hashtag. Tada….Report is generated, the Web browser opens the report’s URL and pops up the modal dialog asking to enter the search parameter. What an ugly dialog box that was! Eclipse grey style, 90% of its real estate was empty with an input field on top prompting to enter the parameter’s value. No one in the audience (all Java developers) seemed to care. They are all used to ugly GUI in enterprise applications. OK, this product was using RCP UI components, but the Swing ones are definitely not better.

The sooner Swing is deprecated the better. Even if JavaFX has no future in the Web or mobile applications, it has to become a mandatory replacement for Swing. Just because it promotes a better looking UI. Just because it promotes better taste among Java developers, who live in two different realities: the ugly depressive GUI at work and the eye candy world of iOS or Android applications. Let’s make a first step toward merging these worlds by killing Java Swing framework.

Written by Yakov Fain

November 9, 2013 at 2:06 pm

Posted in html5, java, User Experience

74 Responses

Subscribe to comments with RSS.

  1. You can produce HTML5 applications in Java.
    And I m sure you know about GWT.


    November 9, 2013 at 2:48 pm

    • There are fifty ways to skin a cat… as long as you want to do it. My message is that dragging along this 15-year old technology makes Java developers feel OK with creating ugly and boring interfaces. With so much investments and hype around JavaFX it should be used at least as a replacement for Swing.

      Yakov Fain

      November 9, 2013 at 4:46 pm

      • While I agree that Java Swing should be deprecated. Your post implies at several places that you cant write good looking UIs with Java. Or do HTML5 in Java. Which is not true.

        Just a few quotes.

        “I also tell them that if Amazon.com would decide to re-write their UI in Java they’d be out of business in no time”

        “Java developers look down at the HTML/JavaScript crowd. Yes, programming in JavaScript is not as productive as in Java, but HTML5 applications usually look nice”

        There you imply that you cant do HTML5 apps in Java. Which is also not true.
        Here a couple of examples :

        GXT(http://www.sencha.com/products/gxt/), SmartGWT(http://www.smartclient.com/smartgwtee/showcase/),

        and there a lot more out there.

        So to me it s one thing to say Swing is old and should be deprecated it s another to imply that Java in genreral is not an option when it comes to HTML5



        November 9, 2013 at 6:22 pm

      • Wow, what an insult to thousands of developers working on great user interfaces. There are as many “usgly and boring interfaces” as there are cool and exciting ones.

      • Java is for backend stuff. HTML is for interfaces. How do you not get this? Some Java developers may abstract all the HTML away with some silly framework, but I don’t. I literally use HTML/Javascript, literally, as the interface, and Java is for the backend. You can’t very well use Javascript for the backend, now can you? So what are you going to use? Php? Lol. .Net? Give me a break. Java all the way. And I think Amazon DOES use Java in the backend, so I don’t understand your position at all. You don’t know what you’re talking about.

        “If not with Swing framework, how should my Java students learn GUI programming?” If we’re talking about webapplications, then HTML5.

        john smith

        December 16, 2013 at 7:08 pm

    • There are SO MANY applications that shouldn’t be moved to HTML5.
      As soon as you go to business applications you’d realize that it’s not about shiny pixels but about productivity of the user.

      Your point of view is academic – that’s okay. But It seems you’re detatched from business and reality. You have a typical binary argumentation – either Swing or FX. But if you leave the ivory tower you’ll see that the world is gray and doesn’t consist of zeros and ones only


      December 3, 2013 at 7:57 am

      • I agree that the post is purely academic. In the business world there are still many “boring” useful business apps running on Swing and they’re not disappearing any time soon, this would cost a lot of money for no added value, plus Swing is very mature and proven. Swing was updated in Java 7 to support generics. JavaFX 2.2 is not as mature as Swing yet. FX 8 will probably be closer to Swing 1.3. I develop Bloom, a Swing photo uploader and no one has ever complained that it’s boring, as long as an application brings value to users the library/language is irrelevant.

        Carl Antaki

        December 5, 2013 at 12:56 pm

    • All these web “programmers” think its only the web that exists right ?

      Swing is needed for things HTML/Srcripting FX cant do -> https://platform.netbeans.org/screenshots.html

      .. and will never do-

      Ale Vaz

      April 20, 2014 at 9:54 pm

      • Don’t you think all these apps with nice GUI could be done in JavaFX?

        Yakov Fain

        April 20, 2014 at 10:15 pm

        • I get the impression that you simply like to rant.

          David Smith

          October 29, 2015 at 8:48 pm

  2. My message is pretty simple, and it’s not that you can’t generate HTML from Java. What I’m saying is that currently there is Swing and JavaFX – one of them is good looking. The other should be deprecated.

    Yakov Fain

    November 9, 2013 at 6:27 pm

    • I disagree. Stating that a library needs to be deprecated simply because it “looks ugly” out of the box is not a good argument. Swing is a great library that has years of bullet-proofing.

      If you want to make Swing UI components more pleasing to the eye, you have several options:
      1. Change the Look and Feel. You can change it to look like the native look and feel (Windows/MacOS), download and run a custom look and feel (google for Synthetica, SeaGlass, Substance), or script your own (Synth L&F comes with Swing). You can also modify the layout using the JGoodies libraries.
      2. Use custom components (SwingX, JIDE, paintComponent())

      Also look at some of the work done by Karsten Lentzsch, Romain Guy, Chet Haase, Amy Fowler, or Kirill Grouchnikov. They have made massive contributions to Swing.

      Java Swing is very rich, has years of contributions, and continues to live on in JavaFX. I still use it for development projects in production, when the client desires a rich desktop client and not a web UI.


      January 6, 2014 at 5:17 pm

  3. Yakov, you absolutely right. Thanks for your article!


    November 9, 2013 at 7:48 pm

  4. Swing is the most meaningful UI framework in the Java ecosystem: https://platform.netbeans.org/screenshots.html. I’d love to have a debate with you about this. The point is, good looking is nice. But that’s only part of what an application needs — e.g., reliability, stability, etc etc etc are much more important.

  5. “What an ugly dialog box that was! Eclipse grey style, 90% of its real estate was empty with an input field on top prompting to enter the parameter’s value.” Man, what a bad example. Hope you have better ones. Right now, your key example is that someone created a badly designed SWT dialog. How does that prove that Swing should be deprecated? And “the Swing ones are definitely not better” is pretty poor too as an argument, i.e., you can make nice UI in SWT and in Swing, if you want to do so.

  6. “Whereas Swing components are ugly by default. They are so last century.” That’s just rubbish as an argument, isn’t it? How do you get away saying things like this? Sure, some Swing apps are ugly. Other ones aren’t. Plus, who cares whether Swing apps are ugly if they’re also useful?

    • Geertjan, IMO the attitude “who cares whether Swing apps are ugly if they’re also useful?” is damaging for the Java platform. The UI should not look as if it was created in the last century. I hope that JavaFX can be a way of achieving it. Unfortunately, Oracle is not giving a clear message about the role of JavaFX either. Do you have an opinion of what JavaFX was created for?

      Yakov Fain

      November 9, 2013 at 10:43 pm

      • I really think you’re the one that’s seriously damaging the Java platform with your half truths. Please spend some time looking at this very long list of fantastic Java Swing applications: https://platform.netbeans.org/screenshots.html Their UIs are sometimes great, sometimes not so great, just like JavaFX UIs which are also great and sometimes not so great,

      • I don’t believe that Java Swing UIs look as if they were created in the last century! Stop saying things like that! Java Swing UIs look as good as their developers created them to be! Stop spreading this disinformation. Many Java Swing UIs look really great.

  7. “In the end, I tell them that they won’t be going doing Swing programming in the real world projects.” You’re telling them lies. Just, simply, lies. Or you’re just plain ignorant. Ask anyone creating applications in the banking sector, i.e., high frequency trading. It’s all Java Swing. And internal defense force applications too. And oil/gas analysis applications. These all have to do heavy data processing and they’re very concerned with security/authentication issues. Hence they need desktop applications that can run on all operating systems. They also don’t want to rewrite the wheel from scratch but use existing knowledge and predefined components and hence they need Java Swing: https://platform.netbeans.org/screenshots.html Your disinformation campaign to your students… who are you trying to help with that? I can only conclude, since I must assume that you’re not a willfully evil person intentionally lying to your students, that you’re plain ignorant.

    • Geertjan I have to finish our dialog – you’re just being rude. I don’t where you work, but in my enterprise world for every 100 Java developers there is no more than 2 that do Swing (I have no scientific proofs to these numbers). And this is for a very good reason. I used Amazon as an example, but now I’ll make even stronger statements, which might irritate you even more.

      1. None of the Web applications should use Swing.
      2. None of the mobile applications can use Swing.

      Now you can deny that we live in a Bring Your Own Device (BYOD) world. Fine. I’m not interested in continuing this conversation with you.

      Yakov Fain

      November 10, 2013 at 12:03 am

      • I think you should find out who Geertjan is before you go dismissing him or what he has to say. Swing is alive and well in lots of businesses and applications where there’s more functionality required than what can be delivered in a web-browser. For instance, the major airline departure control application used at every major airport in the world is written in Swing and is continuing to be developed. I think you should probably try to update your view of the real world, because you’re quite out of touch.

        Michael Graham

        October 28, 2014 at 1:25 pm

      • Yes, I agree with you. No web applications should use Swing and no mobile applications can use Swing. So, on those points, we agree completely…

  8. “I also tell them that if Amazon.com would decide to re-write their UI in Java they’d be out of business in no time.” Man, what a bad example, again. Sure, not everything can or should be done with Java Swing. Just because Amazon wouldn’t function well with Java Swing or JavaFX doesn’t say anything at all about either JavaFX or Java Swing, does it? It just says that Amazon’s use case doesn’t fit with Java Swing or JavaFX. Or are you saying that those who are using Java Swing are stupid for choosing Java Swing? Isn’t it more likely that they’ve weighed their options and decided that Java Swing is the best choice for their use case?

  9. There are far more rich client applications being used and actively developed then some people think based on some inaccurate popularity statistics. The reason for this is that they are often being developed in protected envirnments for clients who don’t really like publicity about their applications. (and why would they, they don’t need to sell them..). Think defense, medical research, and other crucial systems for society. The reason they use swing for example is reliability, security and stability. Web applications don’t come anywhere near rich client applications on those fields.

    Even though some things are over complex to create in swing, this does not make it a bad framework. That it doesn’t look very modern, perhaps even outdated if you whish, if you don’t spend some effort in design, also doesn’t make it a bad framework. There are some very good examples around that web applications also look like crap without a proper design. I agree that design is an undervalued task in most IT projects, web and rich clients. It has nothign to do with swing though.

    Even when we where still doing web based projects, we used to prefer to hire java developers who did at least a period of swing programming. They just happened to be better programmers.

    Swing is a good framework to teach graphical user interaction programming models (browsers are not made from lego..). JavaFX provides this and separation of design and logic (fxml), and the importance of the design role since it makes it better recognizable in JavaFX. JavaFX on the NetBeans platform teaches all this plus good architecture. Most people seem to forget that apps on mobile phones are just small rich clients and a browsers is also a rich client. Development environments are also rich client applications (did you ever hear someone complain about eclipse or NetBeans not looking flashy enough?). Web technology cannot exist without rich client technoligy and in modern day society also vice versa. It’s now time for the web developers to stop looking down on rich client developers and recognize they are not the modern day cobol developers. Web and rich client technology need to coexist and work together instead of fighting some silly popularity contest.

    Timon Veenstra

    November 10, 2013 at 12:25 pm

  10. This discussion is interesting to me because I find myself deploying a strong combination of Swing and JavaFX. These views are almost all in support of NASA ground system software, typically behind a DMZ’d sub-network but I also build the tools to be deployed to an analyst’s desk. So my interfaces must be very usable AND look good (or nobody will use my software).

    The more I use JavaFX to implement certain views of the various data sets the more I like it. However that’s all it really provides… an enhanced skin. I could already do everything I can do in JavaFX 2.x in Swing except CSS styling? With the exception of Java 8’s integration of JavaFX 3D, the only incentive I have to use JavaFX is the code footprint tends to come out simpler for the flashier things. However the simpler layouts are sometimes even simpler in Swing. (How many ways are there to pop a message or show a dialog?)

    So why deprecate Swing when it is such an effective workhorse? Why does Russia still launch the ugly and limited Soyuz design after 50 years? Because it works and they have no real incentive to improve. I think that is the crux of the matter.

    Don’t deprecate Swing… give us some better reasons to use JavaFX. Better 3D! Better Chart Control! Expanded Media support! Give younger developers a reason to use Java at all instead of HTML5 which is eating Java’s lunch. Deprecating Swing won’t stop that because JavaFX as is just isn’t that compelling, and I’m an advocate.

    Sean Phillips

    November 10, 2013 at 4:12 pm

    • What has been done to improve Swing over the last 10 years? Pretty much nothing. In this regard, it’s really coparable to the 50 uear old Soyuz. But the difference is that you can’t ignore the BYOD trend that exists in the vast majority of the enterprise world. Well, NASA may be one of these enterprises that can afford to ignore smaller devices.

      But you can’t hide from the fact that Swing is simply a stale technology. Apple didn’t let Java on iOS. Oracle can say, “Bad Guys”. Google doesn’t give a damn about Swing. Oracle sues them. Google’s great Java experts can’t even speak at JavaOne. Even dying Blackberry stopped supporting Java API on their new devices.

      Java Swing Applets are useless in any setup except the super-controlled enterprise setup where corporate sysadmins are reimaging all corporate computers installin the proper version of IE with backed in Java runtime.

      JavaFX 1.0 has been released five years ago. What was it developed for? Is its future bright? Are there any plans to make any changes in Swing or it’s the ain’t broke don’t fix Soyuz situation?

      Yakov Fain

      November 10, 2013 at 4:43 pm

      • ” Apple didn’t let Java on iOS. ”

        Apple didn’t let dynamic linking on iOS. But fortunately it does not force to write in ObjC now. So Java for iOS is just technical question now. The only thing that should be done is to compile Java statically on iOS like Excelsior JET does (remaining Java compatible). So Java for iOS (and true Java for Android) is just a matter of time.


        November 17, 2013 at 3:21 pm

      • You raise up some interesting points, for instance it is true Swing is stale and it does seem like an “ain’t broke don’t fix” scenario. But this whole BYOD… is a bit over-hyped. It doesn’t really exist in NASA or US DoD systems for obvious reasons which is where Java, and up until late Swing, has dominated. It’s a gigantic security risk and most large enterprises abhor this as well. Honestly this is the way it should be… if it doesn’t require strong security or performance then it should be a web app.

        And please don’t complicate the discussion of deprecation of Swing with bringing up Applets. If an organization isn’t going to use a Swing Applet then they aren’t going to use a JavaFX Applet. Ironically the very scenario you described for where an Enterprise might use applets is basically the scenario for most large enterprise setups. In fact it’s all VM’s and Images at this point, even in the vaunted BYOD world. The only BYOD systems I’ve seen that are worth anything all insist running a corporate/government VM

        The real problem is that a lot of young developers are trying to ram HTML5 web apps into these spaces that Native Applications make the most sense. And why? NOT because of Swing… but because the Java alternative to HTML5 (Swing or JavaFX) isn’t compelling to them. Well that and the fact that they’re mostly arrogant know-it-all jerks, but we were all there once.

        Sean Phillips

        November 10, 2013 at 5:06 pm

      • You can hardly argue java is ignoring small devices, if you have a bank/credit card with a chip on it, it will have java on it. Regarding to phones, there are still more phones running on java then there are running android or ios.

        Mature and stale is something different. It’s actually a good thing not to change api’s every month.

        The fact that apple doesn’t let java on ios has nothing to do with swing. Considering the dominance of java phones for the past years, they might even be afraid to let java on their phones…

        Google is a web company, ofcourse it doesn’t give a damn about swing. Oracle’s lawsuits against google have nothing to do with swing. It’s about android containing some illegal copies of java api’s.

        Applets? The whole point of swing is not to need a browser. Forget about applets.
        Think openoffice, airplane design, space mission control, airspace control, harbor management, farm management. We are talking types of applications that used to be written in C++. You could write a browser in java (in fact it would be faily easy with javaFX webview). Try to write a browser in html and javascript. It’s a totally different ballpark. Stop comparing apples and airplanes.

        JavaFX 1.0 was a step into the wrong direction. Things like that happen. Fortunately they recognized they where heading in the wrong direction and they fixed it with 2.0. Now they have a solid base ui framework, we need things that will make a different like easy 3D api’s, embedded media, native packaging etc.

        Timon Veenstra

        November 10, 2013 at 5:32 pm

      • “The fact that apple doesn’t let java on ios has nothing to do with swing. Considering the dominance of java phones for the past years, they might even be afraid to let java on their phones…”

        Haha good point Timon, I had never thought of it that way.

        Sean Phillips

        November 10, 2013 at 6:02 pm

      • So what you are saying is that Apple “didn’t let” Java on iOS because Swing is “simply a stale technology”? Or are you not saying that? I am having a really hard time following your logic. All I know is that in large enterprises the desktop works very well in combination with the web and the mobile world. Sometimes Swing has a place there and sometimes it doesn’t. The world is MUCH more diverse and colorful than you seem to think.

  11. We are working on making this all Drag and drop in Javafx http://www.youtube.com/watch?v=9Ca-3Llb3Xg

    Mike Tallent (@abigdreamer)

    November 11, 2013 at 3:50 am

  12. You are right that applets seem to have been replaced with HTML, so maybe you should not teach that part and split up between web applications and desktop application. Teach that you pick the right technology for the right problem.

    Swing is the most used UI framework on the desktop and it certain does not need to look bad, you just need to add a decent skin. Or maybe I should show you some bad looking HTML (web pages)? ;-)

    Whether JavaFX will replace Swing? Maybe, maybe not. Maybe HTML take over everywhere, even in enterprise desktop applications. Time will tell, but that will not happen in the short term. HTML for serious desktop applications has too many drawbacks still.


    November 11, 2013 at 9:04 am

    • Are you a politician by any chance: :)

      “applets seem to have been replaced with HTML,” Why not just saying “Applets had their three years of fame from 1995 fo 1998 until the most idiotic law suit between Oracle and Microsoft”? After that Microsoft killed applets and they ceased to exist.

      I tought applets to demonstrates the mechanism of callbacks, to show how to embed an object to html page. Unfortunately some smarty pants may be asking how applets work during tech interviews. I wouldn’t be surprised that someone will even not hire a candidate who doesn’t knwo what’s HTTP tunneling.

      Yakov Fain

      November 11, 2013 at 12:00 pm

      • No, fortunately I am not. But your claim does sell applets shot.

        Applets are still in use, many remote desktop solutions use them, and a lot of banking solutions also employ them. And assuming that Oracle manages to close the security gaps in the plugin (mind you: it’s not Java that has security issues, but the browser plugin), they still have some very interesting use cases.

        Applets however are considered too heavy weight for small objects in the webpage, because of the need to start the full JVM. J7, then J8 and now J9 were/are suppose to fix that. Applets nowadays often take over most of a browsers window. Because a lot of browsers are disabling the plugin, I’m expecting a move from applets to webstart, but because applets take over the screen anyhow, that should not be a real problem.

        Your remark about microsoft killing applets is strange and in my opinion even incorrect. Microsofts attempt to mimic applets only ever was somewhat usable in IE and on windows only. Flash took over the role that originally was envisioned for applets, because it was quick to start. But the attempt to make flash grow to write serious applications with (called Flex) pretty much failed.

        So what you see is a lot of technologies in the same space, each with their own advantages and troubles. Therefor each technology has a segment where it is the better choice.


        November 11, 2013 at 12:23 pm

        • This is the lawsuit: http://www.techlawjournal.com/courts/sunwvmsft/Default.htm. Sun won the battle, but lost the war. Microsoft stopped upgrading the IE’s Java plugin, which technically killed the applets.

          Yakov Fain

          November 11, 2013 at 12:46 pm

        • Yes, Microsoft was slapped over the hands for modifying Java so it no longer matched the Java spec and still wanting to call it Java. Following the lawsuit Microsoft decided to create a Java clone called DotNet. Sun then wrote a plugin for IE itself and installs it as part of Java. Hence the use of the object tag instead of the applet tag when embedding an applet.

          If it were as you say, it would be strange for the Applet plugin in IE11 to have security issues in 2013 and Oracle fixing them. Right?


          November 11, 2013 at 1:21 pm

        • I’m not going to put the blame on any of these companies. It is what it is. One way or the other applets are dead.

          Yakov Fain

          November 11, 2013 at 2:24 pm

  13. I think you’ve hit a nerve Yakov. But I agree with you 100%. That’s one of the things I liked about Flex 3, was that you could have something that showed the developer had UI/UX sensibilities out of the box. This also carried over to the Adobe AIR environment also. But when I look at Java stuff, like you said, it isn’t very inviting and the community doesn’t seem to have a problem with that. Sure, you can skin it if you like, but as far as the ecosystem is concerned it isn’t very hopeful.

    Justin Dallas

    November 11, 2013 at 3:03 pm

    • “the community doesn’t seem to have a problem with that.”

      Justin, this is exactly my point. A hundred Java developers sitting in the room are looking at this grey boring looking UI, and no one would seem to bother. If this would be one of those Flex/Flex/AIR conferences, the speaker wouldn’t get away with such a UI. And now people are leaving comments with the links proving that in some cases someone somewhere has created nice looking GUI with Java Swing too. Creating beautiful GUI must be promoted among Java developers. But who’s going to do this? How to make Java developers switch to the “GUI first” state of mind?

      Yakov Fain

      November 11, 2013 at 3:21 pm

      • “A hundred Java developers sitting in the room are looking at this grey boring looking UI, and no one would seem to bother.”

        Again, not a problem of Swing, but of how it is used. I can show you, as Timon said above, lots of crap looking webapps too.

  14. As a person doing Web GUIs for >17 yrs (including 5 yrs in Swing), and actually sitting next to you during that “boring” Swing presentation [IMHO, presenter was boring], let me put 2 cents. I have mixed feelings here…
    Swing was good and fun, and my company built great looking Swing signed applets with CORBA in 1998-2000 (with help of good UX designer). I also worked on other Swing apps in 2005-6, yes, for defence company. I still get lots of job offers with Swing, but reject them (not because I hate Swing, but because it has no future).
    I do understand that after Flexodus you jumped into HTML5. Maybe today JavaScript is dramatically different from what it was in 2006. I still can’t force myself into it, Java and Flex spoiled me.
    I would prefer to build GUIs in JavaFX (is it still alive? has bright future?), Vaadin/GWT, Dart or Grails/Spring MVC with some JS sprinkles. And thank God, Flex is not dead!..

    Maybe we should encourage Oracle to give JavaFX another chance..

    As for Swing – don’t beat that old horse, it did a good job some years ago.

    Will definitely enjoy your upcoming Web book. Maybe it will persuade me to go into HTML5 land… Cheers!


    November 11, 2013 at 6:36 pm

    • >>>I would prefer to build GUIs in JavaFX (is it still alive? has bright future?),

      While speaking at JavaOne this year I noticed that just about everything was pushing either JavaFX or HTML5 over J2EE. I even demonstrated using it embedded within a Swing application for the final conference Keynote address. So yes it is very very very much alive.

      Interestingly a significant portion of the JavaFX talks also involved embedded platforms such as the Raspberry Pi, a place the web tech doesn’t belong.

      Sean Phillips

      November 11, 2013 at 7:16 pm

      • Sean, during the last four years I also saw that JavaFX presentation are getting preferences in JavaOne conferences. First, I didn’t like it because the product was not competitive. Now it seems to me that Java conferences are the only venues where Oracle evangelists promote JavaFX. I’d like Oracle to push JavaFX in the enterprise world too.

        Yakov Fain

        November 11, 2013 at 7:38 pm

        • Yes there is a bit of Evangelism going on there (Shocker right…), though to be fair JavaFX just wasn’t all that competitive even 2 years ago so the only way it would get any recognition was via a guided venue like JavaOne.

          I did see some technical talks about using JavaFX with an Enterprise setup however they were few in number. The good news was that these few sessions were very good and conducted by very competent folks. For example Adam Bien just repub’d one of his J1 talks yesterday that you might be interested.


          Sean Phillips

          November 11, 2013 at 8:40 pm

        • Thanks for the link to Adam’s presentation. I’ll definitely watch it. The more independent developers will present on JavaFX the better.

          Yakov Fain

          November 11, 2013 at 8:49 pm

    • I don’t know, during the aptly termed “Flexodus” I looked at the JS world too and was horrified. In terms of tooling, JS simply isn’t anywhere near Flex. The fact that in some JS libraries, a misspelled listener just gives you a blank screen and framework errors without telling you where where the code went wrong means in my eyes it isn’t ready for primetime. That isn’t to say that people can’t build magnificent apps out of JS, but the community is struggling to learn the lessons that existed in Flex.

      I think the HTML/JS folks exhibit a very similar siege mentality as the Swing proponents in this thread, where they completely disacknowledge that there is anything wrong or lacking with the the tech. Fortunately, as HTML/JS/CSS becomes lingua franca for almost everywhere, I hope that there will be some knowledge transfer and architectural clean up, even if it is at the tip of a sword.

      Justin Dallas

      November 11, 2013 at 6:49 pm

  15. Would you like to deprecate IntelliJ IDEA (and WebStorm, PHPStorm) and Netbeans as well? Making desktop applications in java is the only realiable way in the world of three major desktop platforms. And Swing is quite good here. IDEA looks better than native Windows applications. Probably we should deprecate applets and WebStart instead, replacing them with more relibale deployment model? Or just fix default security warning about them in all browsers. This warning kills applets and WebStart. Only one warning (honestly speaking several warnings in a sequence).


    November 17, 2013 at 2:26 pm

    • “Making desktop applications in java is the only realiable way in the world of three major desktop platforms.”

      EVer hear of Adobe AIR, Chrome Apps, TideSDK etc ? …


      November 17, 2013 at 6:29 pm

      • Yes, of course. Java is far ahead here in terms of performance and dev.tools & apis richness.


        November 18, 2013 at 3:54 am

    • Probably Oracle should…But never did. The talks about doing something better than WebStart are going on during at least 10 years.

      Yakov Fain

      November 17, 2013 at 3:05 pm

      • Why Oracle should? It does not need it (as I see at least). If Java community needs it, it should implement it without waiting Oracle. Stop talking about this, just implement.

        BTW, I am prototyping right now a new Java deployment model, where Java desktop applications are starting simulteneously with downloading (coming from web-server by parts, and only needed parts are downloaded). This way, they can be started as fast as web application (because it is very similar to deployment of classic web based on HTML and JavaScript). If you write your UI really separated from logic (you can do it with FXML now) it will really start as fast as web in my deployment model (and has all other advanatages as web has now like emedded free invisible autoupdate). And I feel this deployment model can compete with classic web based on HTML + JavaScript in the future offering better performance and richer development environment.


        November 17, 2013 at 3:59 pm

  16. “HTML5 developers know that having a Web designer producing professionally looking CSS is a must. Whereas Swing components are ugly by default. They are so last century.

    They are all used to ugly GUI in enterprise applications. OK, this product was using RCP UI components, but the Swing ones are definitely not better.
    My message is that dragging along this 15-year old technology makes Java developers feel OK with creating ugly and boring interfaces.”

    It is not about Swing actually. It is all about desktop development. On any language. Desktop is so last century. It is true. It is boring. Written using Win API, GTK or even Cocoa, all they are boring and ugly. And developers of desktop applications (Java, C++, Python) feel OK with it. Java and Swing or SWT just makes the desktop development faster here. It does not make it more or less boring or ugly.


    November 17, 2013 at 5:01 pm

  17. Yakov Fain

    November 17, 2013 at 7:40 pm

  18. I’m sorry to say it but you have no clue what you are talking about. If you need some examples of beautiful Swing applications take look at Karsten’s home page: http://www.jgoodies.com and especially at his demos http://www.jgoodies.com/downloads/demos/. As far as I know JavaFX still does not have support for accessibility (https://javafx-jira.kenai.com/browse/RT-26589). In the most countries (including USA) you wan’t be able to sell any product to government institutions without proper accessibility support. And the support for right-to-left orientation comes only with JDK8, which is not released. And when JDK8 is released it would take a lot of time to be adopted by the customers. So for now JavaFX is not suitable to create real-world products.


    December 4, 2013 at 8:53 am

  19. SWT was created as a response to the sluggishness of Swing around the turn of the century. Now that the differences in performance are becoming negligable, I think Swing is a better option for your standard applications. SWT/Eclipse has a nice framework which helps with a lot of boiler plate code.

    Aurelio Todd

    December 7, 2013 at 7:10 am

  20. Hey Yakov, how are you?
    I don’t agree and here is why…
    First of all, you and I know for a fact that there are great applications currently running and/or are being planned and developed utilizing Swing as I comment.
    I think that, given the current level of Swing’s maturity and popularity, it’s to early to deprecate it. I would give another 1.5 – 3 years just to start thinking about the replacements in certain sectors. Couple of questions come to my mind right of the bat:
    Can you recommend any IDE which has been developed utilizing JavaFX, GWT or any other JavaScript based technologies? I have seen few HTML5 Desktop implementations and they are so immature compare to ones implemented in Swing. To be fair, I have to admit that everyone was saying the same about Swing in 1999…Yes, it’s not only technology, it’s the level of technologist’s expertise..So it will take time.
    Would you really recommend a client to replace Swing trading or some other messaging intensive application with HTML5 or Flex apps today, not in 2 years, today?
    It’s to early to deprecate, there are no web substitutes at this time.

    Michael Glazer

    December 12, 2013 at 3:28 pm

  21. I do Java Swing development for last 7 years and you can check my portfolio to see real world apps. The most recent are from financial, mobile apps testing (done on the desktop pc with connected device) and flight control system. So please don’t deprecate Swing :)



    January 10, 2014 at 9:15 pm

    • OK, I won’t. Promise :)

      Yakov Fain

      January 10, 2014 at 9:20 pm

  22. Here’s an article, where Sean Phillips explains in detail why I’m wrong: http://www.yelp.com/topic/sacramento-is-it-true-that-businesses-can-pay-to-remove-bad-reviews

    And this is an extended discussion of his post at Reddit:

    Yakov Fain

    February 3, 2014 at 8:39 pm

  23. Ye gods. Have we forgotten already that giving people with zero design ability access to those kind of tools ended up giving us Geocities?

    I don’t particularly want things like that floating around my desktop. I want to see standardized components that work the way I expect them to, conforming to the preferences I have set myself in my UI’s customization. I want the application running in that window over there to look and feel and work the same as the one in this window over here. I’m certainly not interested in boosting the egos of people like the Google Chrome devs that seem to think they have a better idea of UI design than the designers of my OS, and that their choices should override the ones I’ve set myself.

    Matt Thomason

    May 4, 2014 at 6:44 pm

  24. I think it’s all a matter of function and place. For much of what Java is set out to do, it doesn’t need to look pretty nearly as much as it needs to be functional, stable, and secure. Part of the reason Swing doesn’t tend to look as nice as HTML5 is because its purpose and audience are different.

    That being said, though, I think you are absolutely right in your pain point about teaching students GUI programming with Swing. For new developers especially, it is hard to get jazzed about event handlers or GUI design using Swing when what they are used to seeing and dealing with are clean, sleek websites or mobile apps.


    June 10, 2014 at 3:42 am

  25. […] time ago I blogged that Java Swing should be deprecated and replaced with JavaFX. In this blog I’ll show a piece of JavaFX namely event handlers and […]

  26. I don’t agree. In my company, I have developed several Swing based applications and my team uses them widely. Ok, they are internal use applications and not general public oriented. But works, and it makes clear than Swing is not bad just for the reason of the ugliness. Anyways, this has a simply solution: in only one line you can configure Swing to use the L&F of your system:


    And the problem is over! Now, your Swing application is as ugly as any other application stored in your system.

    In fact, I think it’s important to respect the graphical environment of the OS. If everyone made its own “graphical environment” we would facing a problem in a few years, when each application in the world was different from the rest. “Usability” concept would have dead

    If you think that the L&F of your system is ugly, just install an amazing theme and make Swing to use it ;)



    August 13, 2014 at 9:55 am

  27. Take a look at how easy it is to program in JavaFX: http://yakovfain.com/2014/11/20/tic-tac-toe-in-javafx/

    Yakov Fain

    November 20, 2014 at 4:13 pm

  28. I have been an Stock market algorithm trading developer/architect for past 7 years and I use Swing UI + Core Java for all my programs. Yes my UIs are not great looking. However, I am yet to come across a single client who complained that they were not simple or intutive enough. I am also yet to come across a situtation where a deployed application stopped/got stuck/had scalability issues because of Swing. Ultimatley, Swing is a stable UI framework with a mature UI set. How an application looks depends a lot on the developer. JavaFX has had a very nice start but it will need a few more years to catch up (UI Builders, IDE auto generated code etc). Don’t tell your students they won’t be using Swing. If they go into Banking, Defense or any area where high paying-high performance combinations rule the game, they will curse you for avoiding the learning curve of Swing.


    November 29, 2014 at 9:57 am

    • @makarandmone

      I am curious what IDE/Tools are you using for your Swing/Java development? NetBeans, Eclipse?


      November 29, 2014 at 1:25 pm

  29. Have a look at IntelliJ, Webstorm, or Netbeans. Ask yourself, can I program that piece of software in Javascript. No? Well then STFU. Swing is one of the best GUI frameworks out there (if not the best). It has an elegant architecture. If you don’t like the look of it, then get another LookAndFeel, or program your own LookAndFeel. I have been doing 2 years javascript now, and am very much in pain. Back in the Swing days I had robust products, whereas with javascript everything is painfully slow to build and extremely brittle.

    Owen Wilson

    December 12, 2014 at 12:51 pm

  30. For anyone not fully familiar with HTML and Javascript then yes, “Yes, programming in JavaScript is not as productive as in Java.” However if one is capable in both, then it becomes very obvious very quickly that the abstraction of these two entities away from each other creates a much much better ecosphere for a UI and a backend to coexist in a business platform that allows for faster deployments, easier updates, and the ability to harness the actual power that HTML 5, CSS 3, and Javascript have created. Limiting oneself to writing UI code from Java is like running a marathon in work boots. You can do it, but you’re making it harder on yourself.


    March 2, 2015 at 6:55 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 188 other followers

%d bloggers like this: