Chapter 6. Using JavaFX

In this chapter, we will cover:

  • Creating a JavaFX Project
  • Build UI with NetBeans JavaFX Composer
  • Connecting JavaFX Application to Web Service
  • Connecting JavaFX Application to Database
  • Application States in JavaFX

Introduction

JavaFX is a cross-platform runtime environment introduced by Sun Microsystems with the intent of building rich Internet applications across different kinds of devices. It is not only intended to be used on Desktop, but also to be deployed on set-top boxes, cell phones, TVs, and more.

With the upcoming release of JavaFX 2.0, Oracle will be porting all of the APIs that once were available under JavaFX Script into the Java language. This will make JavaFX more familiar to those who already know Java. The new version will also make it easier to 'talk' to other dynamic languages that run on top of the VM, such as Groovy and JRuby.

Since Oracle has removed the JavaFX support from NetBeans 7 we will need to use version 6.9 or older. Version 7 does not include libraries, visual editor and other features required for the creation and maintainence of JavaFx projects. Simply head on to NetBeans website and download 6.9 or 6.9.1.

http://netbeans.org/community/releases/69/

If you wish to learn more about JavaFX, please visit:

http://www.javafx.com/

A combination of JavaFX Script and Java is used to build visually rich, interesting applications. NetBeans IDE provides a set of plugins that ease the development of such applications.

To get a glimpse of what JavaFX is capable of doing, please visit the sample applications at:

http://javafx.com/samples/

In this chapter, we will configure the IDE to work with JavaFX, learn how to use the JavaFX composer, create a small app that connects to (and retrieves information from) Facebook, create another app to connect to a database, and learn about JavaFX states.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.158.230