Will Java 8 be able to have another release of Swing? - swing

Taking into consideration Project Jigsaw for Java 8 (to modularize the JDK), will a "new" Swing Framework be able to be taken into consideration?
Consideration means:
someone actually rewriting it
including it into a JDK release
I'm thinking, since modules can be included into the JDK, a new framework for Swing can be created and delivered for use to new applications developers, while, for the legacy applications, the current Swing framework would be included.
Would rewriting a new Swing and including it into the new JDK be an option for Java 8? (What are your opinions and considerations to take into account for this task ?)

It was not included in Java 8, and is highly unlikely that it will even be considered for Java 9.
According this JavaFX page, JavaFX is the replacement for Swing:
Is JavaFX replacing Swing as the new client UI library for Java SE?
Yes. However, Swing will remain part of the Java SE specification for
the foreseeable future, and therefore included in the JRE. While we
recommend developers to leverage JavaFX APIs as much as possible when
building new applications, it is possible to extend a Swing
application with JavaFX, allowing for a smoother transition.
In addition, Project Jigsaw is now targeted for Java 9.

Related

Get Monodevelop to use the downloaded GtkSharp

I installed the GtkSharp 3.22.24.36 package via Project > Add NuGet Packages..., which completed successfully. But now Monodevelop can't decide which version of GtkSharp to use (3.22.24.36 or the in-built one, 2.12).
If I uncheck gtk-sharp in the Edit references... dialog, it tells me that I can't use the UI designer without it.
How do I get Monodevelop to use the downloaded GtkSharp (3.22)?
MonoDevelop comes with a custom version of Gtk2 + Xwt bundled. If you plan to use Gtk3, then the designer must be deactivated, since it won't work with Gtk3.
My advice, anyway, no matter which toolkit you use, is to avoid using the designer. As soon as you involve the designer, you code heavily depends on the IDE you use (Visual Studio, MonoDevelop, NetBeans... you name it).
Creating user interfaces "by hand" is no longer traumatic as it was in the 90's with the Windows API. For example, you can find a very good Gtk# tutorial in ZetCode.
User Interface Toolkits are actually very similar, they change the name of widgets and sometimes provide a slightly different layout, but they are all mostly the same, no matter it is WinForms or Gtk(for C#), Swing (Java), or Qt (C++ and others).
I know its an older question but things changed. Abandon MonoDevelop, just use the .NET Standard bound implementation of GtkSharp. You can then literally design interface using glade xml files, using official Glade application from GTK+. You can find it here.
With the current push from MS to abandon Framework in favor of Core, we finally succumbed when we figured out they will kill Framework (which they just did with .NET 5 announcement), but we also used the opportunity to investigate other options for our ports of LoBs to core. We discovered GtkSharp as WinForms replacement and AvaloniaUI as WPF replacement, which not only work perfectly but also truly work cross-platform. We ported several applications already and actually moved more then half of business work stations from Windows to Linux.

building the interface of an eclipse plugin with JavaFX or HTML5?

I am looking for an alternative to swt for building the interface of an Eclipse plugin I want to develop.
Is it possible to build the interface of the plugin with JavaFX or HTML5 instead of swt ?.
I am targeting Eclipse Juno 4.2 or later.
Eclipse 4 defines an application model, i.e. a model of all the parts forming the application UI. The application model is decoupled from its presentation.
This means that different UI toolkits (SWT,XWT,JavaFX,etc.), can be used to implement the model. Theoretically you can build a UI using any presentation technology you want.
That said, Eclipse 4.2 (the IDE) still relies on good ol' SWT for it's UI. Which means, your plug-in will require some additional dependencies to be able to use a different toolkit.
e(fx)clipse (already mentioned by jewelsea), provides the necessary Eclipse tooling to build your plug-in. Among other things it plugs a JavaFX ViewPart plug-in template, which creates an example plug-in and adds the necessary bundle dependencies for you.
Imho, this would be your best bet.
There are lots of things going on, Eclipse versioning can be a bit confusing nowadays (at least for me), you can take a look at E4 but it is not widely used. It has the ability of desining UI with Eclipse RCP/CSS.
An other posibility is XWT. I've seen some business ready application using XWT so it seems to be mature enough. Even WindowBuilder can be used to build UI with XWT. Which is actually declarative UI constructing with XML. If you want to have only the OSGi "goodies" you can take a look at Apache Felix or Eclipse Virgo (Spring-powered). They are application servers based on OSGi so you can build module based enterprise applications.
Last but not least if you are OK with SWT/JFace but want to have web application, take a look at RAP. I have seen a full RCP application converted to RAP running in a regular browser.

Roles of JavaFx 2.0, Swing, and Java 2D in Java 7 Ecosystem

I am a bit confused as to the new standards. To the best of my understanding Swing -- the former standard interface library -- is based on it's predecesor, AWT, and the Java 2D graphics libraries.
Now that JavaFx 2.0 has replaced Swing my question is where does Java 2D fit in? Is it possible to use Java 2D methods to generate graphics on JavaFX interface elements?
Thank you
From the Oracle client tech lead's 10000 foot view of JavaFX.
At various times people have written articles or blog posts or forum posts asking the question, what is JavaFX? ... Is it a replacement for Swing? (The answer would be an emphatic Yes).
Mostly, use of Java2D is unnecessary with JavaFX as JavaFX has strong immediate and retained mode 2D apis.
If really needed, you can use Java2D methods to render to a buffer backing a JavaFX WritableImage or an awt image which you can later convert to a JavaFX image.
To an extent, you can still use Swing together with JavaFX if you want or need to. For example people have embedded a JavaFX webview in the Swing based NetBeans platform.

JavaFX 2 vs Swing for a pure Windows desktop app

I need to write a desktop app and its been a while since I started used Swing so will have a learning curve with either technology.
Are there any advantages in doing my app using JavaFX 2?
4 Years back I was having the same question and came to the conclusion that I would be best of using Swing since a lot of third party libraries were still written for Swing in those days. Also 1.0 releases from Sun were usually a bit rough around the edges (I burned myself on JSF 1.0 and JPA 1.0 :-).
Today a lot of libraries have JavaFX counterparts or are available as JavaFX library. That said there are also a lot of libraries wich are still Swing exclusive. Also I've done some small things with JavaFX 2.0 and it seems really complete. I haven't bumped into any showstoppers.
You need to check how many external UI libraries you are going to use besides Swing / JavaFX (and which one). If the answer is not many or a lot have a Java FX alternative (or are simple to todo yourself) I would definitly go for JavaFX. Also you can still use Swing components in JavaFX.
As stated JavaFX is going to deprecate Swing in the future and Oracle seems committed on JavaFX (it also going to be opensourced). So I would highly recommend JavaFX.
Status update 13 april 2014:
JavaFX has been opensource for some time now: https://wiki.openjdk.java.net/display/OpenJFX/Main
The community is committed to JavaFX; JavaFX only libraries with no swing counterparts are starting to emerge.
Oracle has proven to be committed on JavaFX.
In case you weren't convinced 2 years back: JavaFX now definitely looks like the way to go. Though Swing will probably around for a long time it is currently in maintenance mode. It will take a lot of effort to port large applications (like IntellIJ or Netbeans) completely to JavaFX. And for those large applications such a large scale port is probably not worthwhile at the moment.
Status update 15 september 2021:
The JavaFX community is still going strong. OpenJFX is still there and has a flashier home.
Companies like Gluon (I'm not affiliated with them) offer commercial support LTS releases for OpenJFX.
There is GraalVM support for JavaFX allowing you to make JavaFX applications and distribute them as native binaries (ie. no JVM needed).
There are excellent opensource JavaFX component libraries available like TilesFX.
Both are good options:
If you want a rich, graphically enhanced application, the features of JavaFX 2.0 may be very appealing. It is designed to give you a lot of creative control over your user experience and visuals. Just be sure that it is supported on your target platforms....
If you want a standard desktop application that runs on as many platforms as possible, then Swing is probably a safer choice (since Swing is guaranteed to be available as part of all modern Java distributions). It also has the advantage of more mature 3rd party libraries.
Neither is likely to replace the other: they have slightly different target uses and will probably co-exist for many years to come.

Swing or SWT/JFace - for integration with MS Office

I 've read a lot of discussions about Swing vs SWT/Jface. Yet, I have a particular need in mind and I wonder people with experiences here sould kind share your insights.
I'm planning to develop desktop application to integrate MS Office (Excel, Word, Outlook). Which technology I should choose: Swing or SWT/Jface?
many thanks.
What platform are you going to develop your desktop application on, and how much UI tweaking are you planning on doing? It is commonly argued on the internet that SWT and JFace are more suitable for quick out-of-the-box type UI development on the Eclipse platform because they work so well together (eg. JFace wizards, databinding and validation), whereas Swing is more suitable for enterprise level development in NetBeans that requires more UI customising:
http://www.ahmadsoft.org/articles/swingswt/swingswt.html
I have worked on UI applications written in SWT and JFace with Eclipse (which consume web services), and have found such things as the decorator framework to be quite useful. My applications require minimal user interaction, so SWT and JFace have minimized my development time quite nicely. I can see, though that if I scaled out my application to an enterprise level MVC design requiring richer interactions with users that using SWT and JFace may not be as suitable as using Swing.
Just my opinion!