2

This sounds like a useless question at the first glance, but I need to give my colleagues some valid arguments about the history of JavaFX. I know about FXML and that Swing won't get any new features in the future, this already speaks for it self in the IT-world.

But apart from that... WHY did they start from scratch instead of adapting Swing to the new requirements?

JavaFX is easier and it supports XML layouts, but this doesn't sound to me like it is necessary to build a completely new framework.

I read THIS blog and some other sources on the topic and I can't really answer this question. The points I read are mostly minors as far as I can guess.

mKorbel
  • 108,320
  • 17
  • 126
  • 296
codepleb
  • 8,529
  • 10
  • 50
  • 93
  • 4
    The trash can is an important design tool.—[loc. cit.](http://stackoverflow.com/a/22259102/230513) – trashgod Jan 03 '16 at 13:35
  • 4
    Not sure if this is an answer to the question, but JavaFX uses much tighter integration to the platform's graphics hardware when it can. I would imagine it would be very difficult to adapt Swing/AWT to do this. See the [documentation on the architecture](http://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-architecture.htm#JFXST788). There are also many API design features, such as observable properties, to which it would be difficult to adapt Swing/AWT. – James_D Jan 03 '16 at 14:51
  • 1
    Swing (or its predecssor API) was originally build for component driven UI developement (buttons, fields ect), with the added bonus of a very flexible and customisable graphics layer, then came along the partnershp with NetScape, which required Java to have access to native widgets, so we got AWT, Swing was then re-worked to work along side this API as well, so they did have to reivent the wheel. JavaFX was designed as a flash competitor, so it had vastly different goals, but if the demise of Flash at the hands of HTML 5, that goal quickly become irrelevent – MadProgrammer Jan 03 '16 at 22:51
  • 1
    So, the short story is, they had different design goals. When Swing was developed, we didn't really have DirectX or OpenGL pipelines, which are pretty much standard today (and which AWT/Swing have been adapted to use at a lower level), so there are advances in the way things can get done. – MadProgrammer Jan 03 '16 at 22:53

1 Answers1

1

Simply put, Swing, being a 15+ year old architecture, just doesn't work with something like JavaFX. The pipeline and architecture is not there. If they tried to layer FX on top of Swing, they would either break Swing, or hinder FX, or both.

We know a lot more today than we did then as to what a GUI framework needs to do to be better performant, along with what modern developers expect from a GUI framework.

Will Hartung
  • 107,347
  • 19
  • 121
  • 195