Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does JavaFX have a "native look and feel" option like Swing?

Tags:

javafx

It's been a couple of years since I've done any Java work, my last efforts were using Swing. I'm poking around with a cross-platform client app that will interact with a Rails web service. JavaFX is one of the options I'm considering, but I'm concerned at the out-of-the-box aesthetic. Does JavaFX have a native look and feel option for the JavaFX controls (not Swing)?

I'm getting the impression that if I want to build a line of business application in Java, I should probably stick with Swing which is a shame since I like some of the features of JavaFX like binding, a terse syntax, and easy support for REST client programming.

like image 936
gbc Avatar asked Jun 03 '10 17:06

gbc


People also ask

Is JavaFX similar to Swing?

Swing is a legacy library that fully features and provide pluggable UI components, whereas JavaFX has UI components that are still evolving with a more advanced look and feel. Swing can provide UI components with a decent look and feel, whereas JavaFX can provide rich internet application having a modern UI.

Which is easier Swing or JavaFX?

JavaFX makes it easier to form desktop applications and games in Java. JavaFX has replaced Swing because of the suggested GUI toolkit for Java. What is more, JavaFX is additional consistent in its style than Swing and has additional options.

What is JavaFX differentiate JavaFX vs Swing and AWT?

It provides graphics pipelines which accelerate graphical processing without external storage JavaFX also provides canvas and printing APIs, support drag and drop facility, etc. Hence, Styling provided by JavaFX is like CSS. the number of components in JavaFX is more than AWT but less than SWING.

What has replaced JavaFX?

GWT, Vaadin, Qt, JSF, and Electron are the most popular alternatives and competitors to JavaFX.


2 Answers

I haven't see that. At best, you can use the extensive support of CSS styling we got with 1.3 to mimic native look and feel, but that's a big job! Not even sure how to deal with various themes we got on modern systems...
I suppose the point of RIAs is to bring their own look or to be flexible enough to allow to do your own shinny look, not to look like a random bland application on your platform... :-)

(Now, if I like skinnable applications, I also appreciate GUI frameworks using native controls or looking as such, like Qt (vs. GTK+ for example), precisely to provide good old "bland" applications not breaking user experience.)

like image 198
PhiLho Avatar answered Sep 25 '22 03:09

PhiLho


  • JavaFX 2.0 has only one Look by default that is called "Caspian".
  • With Java 8 a second one was introduced, called "Modena".

Both are cross-platform Look&Feels.

See announcement of Modena, with screenshots.

At the moment some developers create native Styles for JavaFX as OpenSource projects. You can find an overview here:

  • http://www.guigarage.com/2013/01/this-is-for-the-native-ones/

If you are interested in the Mac OS L&F (AquaFX) for JavaFX, here are some posts with previews:

  • http://www.guigarage.com/category/aquafx/
like image 23
Hendrik Ebbers Avatar answered Sep 26 '22 03:09

Hendrik Ebbers