3

Why the developers refused to start new projects using super easy JavaFX package? Why they continue their projects with traditional Java Swing package? What will be the future of JavaFX? Will it be discontinued? I heard Java Swing is discontinued and no more future enhancements will be made. As a Beginner what should I learn.

dur
  • 15,689
  • 25
  • 79
  • 125
GRTZ
  • 330
  • 6
  • 17
  • 2
    If you're looking for the biggest pool of jobs, learn Java web development (JEE))), along with Javascript, JQuery, Angular JS, and relational databases. – Gilbert Le Blanc Apr 23 '16 at 10:24
  • Exactly. That is my ultimate goal. Before that I want to practice java SE things. Because I don't have fluent Java knowledge – GRTZ Apr 23 '16 at 10:51
  • 1
    For what it's worth, given the capabilities of HTML5 and the focus on mobile based technologies, I doubt either have much more of a future. JavaFX was touted as a flash competitor, but when HTML5 basically made both obsolete, they had to change tact. I don't think anyone would argue that Swing needed some serious attention, so with two UI frameworks, it was only logical that the investment in the new technology had to be made worthwhile. JavaFX did get a table or tree component until version 2! – MadProgrammer Apr 23 '16 at 11:32
  • JEE and Spring framework(as a framework) does same job? – GRTZ Apr 23 '16 at 15:02

2 Answers2

5

JavaFX is more recent and can be considered as the successor of Swing.

There is many very useful features added in JavaFX. See here some key features : https://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm#A1131418

I can list the main features for me:

  • Styles can be set by CSS (something similar to)
  • Bindings: easy way to bind a ui-value, like width of text of input, to a field in class. Changing the value of the field updates the ui without boilerplate
  • Animations/Transitions: easy way to make an animation, like a ui components which blinks or moves
  • 3D: easy way to manipulate model to make animated 3D view

For making a new application from scratch, i think you should consider using JavaFX, Swing is outdated.

  • But when look at the job market industries work with Java Swing. So do I learn it I won't find any job opportunity? – GRTZ Apr 23 '16 at 09:58
  • 2
    Job opportunity does not depend on whether you learn Swing or JavaFX. Both are equally important. First go with Java Swing and then when you find yourself confidant with the Swing then go for JavaFX. JavaFx has more advanced functions then Swing. But knowledge of both will certainley help you find a good job. Best of luck for a bright future. – Muhammad Hashim Shafiq Apr 23 '16 at 10:08
5

Java AWT hasn't been discontinued, so it's unlikely that Java Swing will be discontinued.

If companies have existing Java Swing projects, it's usually not worthwhile financially to convert them to JavaFX. There's also the problem that there are not many good Java Swing experts, and if you're lucky enough as a company to have a Java Swing expert that's also a User Experience (UX) expert, you don't want to rock the boat.

Companies (and Java teachers) that rely on JApplets and Applets to deliver their UX have bigger problems with browser support than companies using Java Swing. There are companies still using Java 6 because of legacy requirements or client requirements. For those companies, JavaFX isn't an option.

There are still more Java Swing experts on Stack Overflow than JavaFX experts available to answer questions.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
  • yeah i fell it. Because most of the FX related questions not received the answers very quickly – GRTZ Apr 23 '16 at 10:18
  • 1
    [Your only JavaFX question](http://stackoverflow.com/questions/36737653/fxmlloader-constructloadexception-occuered-when-app-gets-initialize) received an answer 7 minutes after you provided enough information to answer it. (Accepting answers is a good way to encourage people to answer your question in the future...) – James_D Apr 23 '16 at 12:44