Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Hendrik Ebbers

author
+ Follow
since Jun 24, 2014
Cows and Likes
Cows
Total received
6
In last 30 days
0
Total given
0
Likes
Total received
6
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hendrik Ebbers

This can be done. Like Swing javaFX supports image operations.
6 years ago
I think that JavaFX will have a bright future. Once Swing came out people maybe thought the same because AWT was already part of Java and teams needed to learn a new UI Toolkit and migrate applications from AWT to Swing. But Swing had a big benefit against AWT and tehrefore a lot of people used it. It's the same with JavaFX today. In my eyes JavaFX has a lot of great new features and you can create modern applications. Doing this with swing would be very hard or impossible. The book is written for JavaFX beginners but it's a big benefit if the reader knows swing. There are a lot of notes that compares the JavaFX APIs to swing.
6 years ago
As you can read in the linked post JavaFX isn't a technology to create web applications: https://coderanch.com/t/636267/JavaFX/java/JavaFx
The main focus of JavaFX is on desktop & embedded applications.
About your CSS question: JavaFX supports CSS and you can style any component by using CSS. The complete overview about CSS support in JavaFX can be found here: http://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html
6 years ago
Hi,
you only need to know Java. If you know the APIs of other UI Toolkits like Swing you would have some benefits and there are notes in the book that compares some of the JavaFX APIs with swing. Since JavaFX 2 it isn't a scripting language anymore. JavaFX is a real Java API / Framework like swing and therefore you can use any Java IDE to code javaFX applications.
6 years ago
In most points your impression is correct. You can do a lot by using Lambda expressions. One of the best examples is how you can define custom cell renderers for tables and lists. Here you can define a renderer factory as a lambda callback. You will find this examples in my book.
But there are some cases where you still need to override methods. The compute... methods are such an example. In this case you have a dependency between width and height. This is another approach as you might now from swing. by doing so you can calculate the dimensions for labels with word wrap, etc. In this case you need to override the methods. If you only want a static size you can use the prefWidth property.
6 years ago
The layout mechanisms of JavaFX are different to the one I know from Swing and other UI Toolkits. You can find some layout basics of JavaFX in this blog post: http://www.guigarage.com/2012/11/custom-ui-controls-with-javafx-part-2/
In addition my book contains a complete chapter about this topic: http://www.guigarage.com/javafx-book/
6 years ago
Sorry, but for me it's not clear what you mean. The resolution of an application doesn't affect the size of a jar file.
6 years ago
Swing and JavaFX are both Java based UI Toolkits. With Swing you can create business application because it contains all the basic controls that are needed: Tables, Lists, Buttons, Textfields, etc.
But Swing was created over 10 years ago and therefore a lot of concepts are old and new functionality can't be integrated without breaking the API. Amy Fowler blogged about this some years ago when JavaFX was in the beginning: http://amyfowlersblog.wordpress.com/2010/09/21/a-heartfelt-ramble-on-swing-javafx/

As said JavaFX contains a lot of new stuff. Here are some of the cool new features:
- CSS can be used to style controls and application
- Animation API
- Graph controls
- 3D Support
- touch support
- all components are vector based and not pixel based
- Media support (play videos)
- a Webview with WebKit backend to integrate rich HTML5 websites
- etc.
6 years ago
Yes, by using the component it's easy to integrate google maps or a youtube video in your application.
Some examples:
https://gist.github.com/jewelsea/1437374
http://sysmagazine.com/posts/170141/
http://oldguardprogrammer.blogspot.nl/2013/01/javafx-and-google-maps.html
6 years ago
JavaFX has a WebView component that uses Webkit to render HTML. Here HTML5 / CSS / JS can be used. By using this component you can integrate a web view or web application in your JavaFX application. Some companies use this to show the help of an application, for example. In this case the help is a HTML page that is styled by CSS. The help can simply be displayed in a JavaFX application by using the WebView component. In addition JavaFX can call JS function in the WebView and JS that is running in the WebView can call JavaFX.
6 years ago
I talked about my personal opinion about this topic in an interview at jaxenter. You can find it here: http://jaxenter.com/the-cutting-edge-of-javafx-49915.html
6 years ago
It is possible to do so. I don't now if it will be easy. This depends on the architecture of the swing application ;)
6 years ago
Hi Claude,
maybe my answers in this thread helps you: https://coderanch.com/t/636267/JavaFX/java/JavaFx

Please ask me if you have additional questions.
6 years ago