Hi
I use several APIs to write GUIs including SWT, Swing, Netbeans RCP and Eclipse RCP. I have a lot of experience with Swing, I know it has some design flaws, it is sometimes cumbersome to use and its hardware accelerated pipelines don’t allow to get consistent speedups. According to some (unconfirmed) rumors, some source code is simply copied from AWT to JavaFX which will make it difficult to run under Android. I assume PureSwing required a lot of work, I don’t feel able to rewrite Swing alone even though there is already an hardware accelerated implementation of Graphics2D based on JOGL (GLG2D). What would you modify in Swing if you had to rewrite it?
Personally, I would try to make the following changes:
- support touch screens and multi-touch (in the same way NEWT does)
- support gamepads
- add a build-in charting API (like JavaFX)
- better separate the general behavior of components from the look and feel
- emulate native look and feels instead of relying on native features
- use OpenGL hardware acceleration to draw every components
- try to remove some non uniform or incoherent behaviors (for example it is difficult to modify the font used in the edition zone of a combo box, there are other examples…)
- let the developer set the event dispatching thread to ease the interoperability with SWT, JavaFX, etc…
- support CSS (like JavaFX)
- expose some parts of the API that handle the data manipulated by the GPU to ease the integration in existing 3D engines (Ardor3D, JMonkeyEngine, 3DzzD, Xith3D, Java3D, …)
- modify PhoneME Advanced For Android to support a larger subset of JavaSE instead of relying only on a very poor subset of J2ME