text: trigger on InvestmentTool.numberOfYears = value {
  getReturn();
  }
  Static Typing
  As you saw in the class definition of InvestmentTool (see Listing 4), attributes are typed. So are other variables in JavaFX. Unlike JavaScript, JavaFX is a statically typed language. Like JavaScript, however, if you don’t specify a type on a variable when it is declared, its type is determined based on its use. So, the following code implicitly types x as an Integer.
  var x;
  x = 3;
  var x;
  x = 3;
  var x;
  x = 3;
  x = "hello";
  Java APIs
  You may have noticed in the getReturn() or hypotenuseLength(a, b) methods described above, both made reference to Java's java.lang.Math class and used one of its methods (see Listing 4). Just as in regular Java classes, the first lines of InvestmentCalculator.fx contain import statements.
  import javafx.ui.*;
  import java.lang.Math;
  JavaFX Still Young
  The ability to quickly develop and more easily maintain rich GUIs that are based on the powerful and well-known Swing API gives JavaFX its appeal. While not Java, its Java base and ability to use Java when required or desired reduces the learning curve and allows for a great deal of immediate reuse. However, JavaFX is still very young and still gaining its sea legs. There are some issues you may want to consider before adopting JavaFX wholesale. It has even been suggested that JavaFX in its current state "doesn't really give developers the ability to do much they couldn't do already, its function is primarily to make existing Java technologies easier to use together."
  To date, there are no visual editors for JavaFX development. For a technology that aims to satisfy user interface and the RIA community needs, this will have to be rectified. It appears that this is a well-known need and one that is to be addressed shortly. As Chris Oliver has suggested in his weblog, "So far I haven't spent time trying to develop serious visual tools to support [JavaFX] development, however once the language and API's have stabilized that's definitely something I want to do."
  By the way, for those anticipating Sun is going to use JavaFX to replace Swing, Sun insists this is not the case. Directly from OpenJFX FAQ page, Sun says it "is not replacing Swing with JavaFX; instead, JavaFX Script makes Swing much easier to use."
  Developer documentation and IDE support is also thin. Even though plug-ins for NetBeans and Eclipse are available (as shown above), simple programming features such as syntax color highlighting and code formatting are missing. Even the code assist documentation suggests there is still a lot of work to be done. Open the documentation for many classes in the IDE and you notice how much "TODO" documentation placeholders exist in this early JavaFX release (see Figure 9).
  Finally, the early versions of JavaFX don't provide much insight on how this scripting language will integrate and tie into the larger application picture. For example, how will JavaFX assist with solid UI content and style separation? How will JavaFX applications at the client-side communicate effectively and asynchronously with the server-side? How do JavaFX applications get deployed or provisioned to the client, especially on mobile/consumer devices?
  More Questions Than Answers
  JavaFX enters a young and burgeoning RIA marketplace.Will it survive? Will it become the UI scripting language of choice especially for Java developers? It is still too early to make that prediction. However, given its ties to Java and the ability to take RIAs beyond the desktop browser into mobile and consumer devices without rewrites is an attractive offering worthy of exploration and careful study today with possible implementation contemplation tomorrow.
  Please enable Javascript in your browser, before you post the comment! Now Javascript is disabled.
  Your name/nickname
  Your email
  WebSite
  Subject
  (Maximum characters: 1200). You have 1200 characters left.