JavaFX and e(fx)clipse

This category provides articles regarding JavaFX as well as e(fx)clipse as this seems to be a good start to deal with JavaFX.

JavaFX has been around for some time now and Oracle is currently triying to enforce it as new standard for Java Rich Client Applications.

Regarding to a developer I know it has had some improvements over the years and it looks like it is going to be a try out worthy successor of AWT (Java), Swing (Java) and SWT (IBM).

However Oracle is trying to push this somewhat new technology into the market for some time now, it has not yet been accepted by the Java community.

Root cause for this seem to be the following reasons.

  • Companies are not asking for Rich Client Applications, but there is a trend for developing Web Applications. Therefore motivation to use anything like AWT, Swing, SWT or JavaFX is low except for private purposes. However JavaFX supports Mobile Applications, which is a big market. Since integration with mobiles is asked by companies as well for web applications and older technologies not supporting it, I can understand Oracle not wanting to provide support for it anymore.
  • Programmers are lazy. If you give them something completely new to learn, it takes quite an effort to get to a stage where you are as fast as using already known technologies. The standard platform for Java development, eclipse is still not providing the same comfortable "what you see is waht you get editors" for JavaFX as it is providing for the older technologies. Until eclipse is not deprecating support for Swing and older technologies like SWT and AWT they will be used by programmers.

I did some research one the internet regarding JavaFX so far but I will try to write more articles in the future about it as I intend to write little tools for myself in Java. For this I of course do not want the hustle of maintaining a JEE server all the time. Therefore JavaFX is intersting for me but I am far from beeing an expert, so try it yourself.

This category provides articles regarding JavaFX as well as e(fx)clipse as this seems to be a good start to deal with JavaFX.

JavaFX has been around for some time now and Oracle is currently triying to enforce it as new standard for Java Rich Client Applications.

Regarding to a developer I know it has had some improvements over the years and it looks like it is going to be a try out worthy successor of AWT (Java), Swing (Java) and SWT (IBM).

Oracle pushes JavaFX

However Oracle is trying to push this somewhat new technology into the market for some time now, it has not yet been accepted by the Java community.

Root cause for this seem to be the following reasons.

  • Companies are not asking for Rich Client Applications, but there is a trend for developing Web Applications. Therefore motivation to use anything like AWT, Swing, SWT or JavaFX is low except for private purposes. However JavaFX supports Mobile Applications, which is a big market. Since integration with mobiles is asked by companies as well for web applications and older technologies not supporting it, I can understand Oracle not wanting to provide support for it anymore. Of course this is just an assumption.
  • Programmers are lazy. If you give them something completely new to learn, it takes quite an effort to get to a stage where you are as fast as using already known technologies. The standard platform for Java development, eclipse, is still not providing the same comfortable "what you see is waht you get editors" for JavaFX as it is providing for the older technologies. Until eclipse is not deprecating Swing and older technologies like SWT or even AWT they will be used by programmers.

In order to change the background of a JavaFX Scene object you have to change a CSS file, which is programmatically associated with corresponding Scene.

In below example the background is set to an image, which is placed in the same directory as the CSS file. I do not think this advisable in a real project where you would have it in a bin directory, but for example purposes it is ok.

.root {
-fx-background-image:url("background.jpg");
}

The CSS file is set in the Scene object as follows.

scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());

The result looks quite nice, but I guess that depends on the picture as well ;0).