Feeds:
Posts
Comments

Posts Tagged ‘JavaFx’

Tested on
- Windows Vista/7
- NetBeans 6.71 with JavaFX

If you need to customize the AutoIt script , you need to install the AutoIt v3 environment (http://www.autoitscript.com/)
Note that AutoIt ONLY works in Windows environment.

Issues

NetBeans is the official IDE for JavaFX development. However, the latest v6.71 (or beta 6.8) of NetBeans is unable to beautify JavaFX Script (JfxScript) code as the “Format” option is not working (It just do nothing.  See Bug acknowledgement).

The code beautifier is one of the most important tools for learning and using  JavaFX as most raw code copied from Internet/ebook tends to be unformatted, making it hard to read and use. Performing manual format is just too tedious. So until the next NetBeans’s release, users have to resort to using painstakingly manual code formatting .

Code beautifier turn this (The following JfxScript code is formatted in NetBeans ! Read on to see how it’s done.)

image

into this

image

(more…)

Read Full Post »

I have been a avid reader of image for over 2 decades ever since its printed publication was available in old Singapore National Library. I remembered sitting for hours in the air-con reference room every end of the month voraciously browsing and reading through stack of InfoWorld publication. During that time, it was the premier source of information on Information Technology, covering many interesting things like upcoming technologies, information management, software tools and reviews. It is gratifying to find how IT can be made so fascinating and interesting just by the skilful words of InfoWorld editors. I’m glad that to this day that InfoWorld successfully capitalizes on the Internet and continues its tradition of delivering high quality of IT news and reporting to even more readers.

Old Singapore National Library
image
InfoWorld Printed Publication
image
The New Singapore National Library 
image
The new National library is now a modernised multi-storey building. Nostalgically miss many of ‘old’ cultural buildings that give a sense of identity.

Therefore, it is my honour and gratitude to be asked and  quoted on the subject on image by Paul Krill image , a InfoWorld editor. Like many Java developers, I am currently learning JavaFX and exploring its capabilities. JavaFX, although still yet to be officially released, has captured the interest of many faithful Java developers who like to leverage on existing Java infrastructure and ecosystem to easily create cool and interactive RIA applications that run not only on the desktop and web browser but also on JavaFX-based mobile phone.

You can find the blog of other outstanding developers who are quoted in the article as well.

  • Andres Almiray image , a experienced Java developer who involves in open source projects.
  • James Weaver image , author of book image , the only JavaFX Script book currently on the market.

To read on the two-page article, click on the following link/image to read the article.

Can JavaFX make a play for rich Internet apps?

image

Quoted as

An anonymous blogger identified only as “geekycoder” lauded the technology: “Technically, JavaFX enables me to leverage [the] Java skill set and Java technology that I am more comfortable with to deliver a compelling RIA solution. Because synergy between JavaFX and Java is excellent and the fact that JavaFX is built on the Java platform means that I can ensure that I have one of the best and supportive platforms to work in. In addition, JavaFX will enable me to be more productive in making it easier and quicker to create RIA solutions,” for Web 2.0.

“JavaFX Script, the language of JavaFX, doesn’t replace Swing, the core Java GUI toolkit, but provides an alternative way of programming that hopefully will bring Java technology to the masses,” according to geekycoder.

Read Full Post »

As JavaFX is near its imminent final release, JavaFX Script is still in the flux of development and uncertainty. As deadline looms near, JavaFX Script is still carving its identity and finalizing its feature set. The specification of the language is very much incomplete even though some documentation exists. Developers will still need to test and explore to determine how JavaFX Script will work. Hence will it be good idea if JavaFX Script takes on the existing proven idea of Java and JavaScript to lessen the learning curve and make it more attractive to Java developers as well as web developer ?

The followings are the suggestion to improve JavaFX Script by making it more consistent, easier to develop and test by leveraging on some language features that familiar to both Java developer and Javascript developer.

I am surprised that blogs on JavaFX  lack discussion about improving the JavaFX Script language but rather focusing on how to use language to get working application. If the language feature does not seem obvious maybe it is the language that need revamping.

(more…)

Read Full Post »

To those Java developers learning JavaFX Script will be dismay to find that the useful interface and enum Java language constructs are not supported. Even though the ability to leverage and reuse existing Java myriad library is quoted as one of the greatest strength of JavaFX, JavaFX’s support for datatypes are currently limited to primitive data wrappers (Integer, Boolean, Number, String) and explicit class. Even though JavaFX Script may not explicitly support interface and enum , however all is not lost and developers can use workaround that involves some extra works. This solution is possible because JavaFX uses Class, the foundation of object-orientated programming, and that interface and enum are both closely related to class. In short, the interface construct allows constant declaration and provides method declaration without body. The enum provides a more powerful way of defining constant which is more elegant and less error-prone. Adapter Java class may include inner class and inner interface and still compile fine in JavaFX Script, however these will be ignored in JavaFX Script.

See  http://java.sun.com/developer/technicalArticles/scripting/javafx/javafx_and_java/

Recently, having browse through the source code in JavaFX, it evidently that interface and enum are indeed been used in JavaFX Script (though directly using interface, enum keywords).  It turns out that interface can be defined in the following manner. Note that user has to define all the interface methods even if one used a adapter class to provide dummy implementation for the interface. Interestingly, variable defined in interface and enum can be used in JavaFX Script like in Java class. Do take note that there is no switch statement in JavaFX Script.

var variable:Interface = Interface { body }

eg taken from Frame.jx in JavaFX Script Source Code

private attribute winListener: java.awt.event.WindowListener;

winListener = java.awt.event.WindowListener { // WindowAdapter has no effect. One still need to define all the interface method of WindowListener)
                                  public function windowClosing(e:WindowEvent):Void {
                                      if (disposeOnClose) {
                                           frame.removeWindowListener(winListener);
                                           frame.removeComponentListener(compListener);
                                           frame.dispose(); // fix me…
                                      }
                                      if(onClose != null) {
                                        onClose();
                                      }
                                      if (hideOnClose) {
                                          visible = false;
                                          showing = false;
                                      }
                                  }

… define rest of WindowListener’s methods

 

Question:

JavaFX Script can reuse Java’s class and methods through using following Adapter pattern but can Java uses function and class of JavaFX Script ?

Answer:

JavaFX Script is still evolving but at this point the answer is NO (even though there might be just workaround) because syntax difference between JavaFX Script’s class and Java’s class. Function in JavaFX is a first-class object and there is also no concept of function in Java. So if JavaFX Script wants to pass data and object to Java’s class and method then pass it using standard primitive type wrapper and Java class.

 

The following table shows how to convert/wrap Java’s interface and enum into compatible implementation (class/method) to be used in JavaFX Script.

(more…)

Read Full Post »

Important

Note that the images of this post have been altered by WordPress.com and it is not the first time it occurs. I will not revert the original images since I don’t have them. I have sent a message to WordPress.com, and up till now yet to receive any reply on this mess up. This is only just one of the posts whose images are mess up. It is a frustrating experience.

http://en.forums.wordpress.com/topic/why-wordpresscom-keep-messing-the-image?replies=2#post-263988 


image For those enthusiastic to develop cool RIA application using the recent release of JavaFX Preview SDK will feel hamper by difficultly of locating information using the HTML documentation that comes with it. The documentation can be hard to browse and use in Web Browser especially for a developer who want to use JavaFX efficiently and effectively. The lack of search function will also make using and learning JavaFX API a time-consuming experience. Although developer can still use the Internet search engine to search for API but this is often slow and requires Internet connection.

image

If you looking for a much better way of using the documentation, there is a solution for you. What’s better way to store those documentation than in CHM help format. CHM (Microsoft Compiled HTML Help) file is that can be viewed easily from those running Windows 98, XP onwards. It allows user to select from a tree of topics and to perform search and print function. In addition, CHM been a self-contained file can easily be distributed.I have compiled the documentation into CHM format so why not download it and start to learn JavaFX more effectively.

 

download
Updated on 6 Aug 2008
File: javafxdocbuild101.doc (3.3mb)
Use browser’s Save As, then renamed file to javafxdoc.chm
(Renaming required as WordPress.com does not support upload of file with extension other than doc and some supported media format.)

 

Feel free to distribute this file

 

Although CHM is developed by Microsoft, there are CHM viewers available for other platforms

Note that I yet to try the CHM file on those platforms.

To find out how the CHM look like, read on…

(more…)

Read Full Post »

Introduction

The RIA market is set to heat up starting from this year as the big three of RIA put their weight on the emerging web trend to put powerful and interactive application running on the web browser. Although Sun, Adobe and Microsoft are by no means the only player in the RIA arena, they are the prominent giants that have the necessary resources, infrastructures and capabilities to execute their vision. Despite other players such as Google’s GWT, Lasso, are gaining momentum  however these players are still  leveraging on ubiquitous AJAX technology which albeit readily supported by leading web browsers, it also ironically limit their potential severely due to impedance mismatch between JavaScript and interactive multimedia application. Moreover the AJAX-based solutions tend to suffer from complexity, performance and compatibility issues due to nature of web technology and indifference between various web browser. For example, versatile graphics and multimedia programming still remain the domain of true RIA solution.

JavaFX

Sun with its JavaFX branding of RIA is the new kid on the block to venture into this still growing untapped market. No doubt that Sun forays into this area aroused from competing giants like Microsoft and Adobe that invest heavily in RIA that may eventually threaten Sun’s valuable asset in Java. In fact, RIA is not new to Sun, and ironically, Sun put RIA into mainstream by introduce the applet back in 1995 which amaze the world how application running in the web browser could transform the user experience and bring the power of desktop application through ubiquitous web browser.  Unfortunately, due to Sun’s poor execution in Applet, applet has a tarnished reputation of being slow, bulky and unintuitive, notwithstanding that it is coupled with problems associated with different Java runtime in user’s system.

Work In Progress 

 

JavaFX finally unveiled to the public with excellent roadmap in JavaOne 2008. JavaFX is a major theme in the annual event. RIA is not new but the concept of able to install a Java application automatically by dragging out a applet and converting into a full desktop application from in a web browser is just fantastic and revolutionizing !

(more…)

Read Full Post »

Follow

Get every new post delivered to your Inbox.

Join 31 other followers