YOUR FEEDBACK
Three RIA Platforms Compared: Adobe Flex, Google Web Toolkit, and OpenLaszlo
NN wrote: Yeah you are right GWT is poor man's Flex. After using GWT on two...


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP THREE LINKS YOU MUST CLICK ON


Playing with UI Features in Compiled JavaFX Script
Introducing the Brand-New Nimbus Look & Feel

Digg This!

From Jim Weaver's Learn JavaFX Weblog

As I've mentioned before, compiled JavaFX Script is currently under development, and one of the last pieces of the puzzle is the UI features. Currently there are a few UI features that are operational in the compiled version, for example Frame, BorderPanel and Button. Fortunately, the user interface API (widgets and 2D graphics) is almost identical to interpreted JavaFX Script, as is the declarative scripting.

For example, this classic border layout (BorderPanel widget) example executes in the interpreted, and compiled versions of JavaFX Script.  Here's the BorderPanelMini.fx code listing followed by a screenshot:

/*
*  BorderPanelMini.fx -
* A JavaFX program for use in a presentation
*
*  Developed 2007 by James L. Weaver
* (jim.weaver at lat-inc dot com)
*  to serve as a JavaFX Script example.
*/

import javafx.ui.*;
import java.lang.System;
import javax.swing.UIManager;
import sun.swing.plaf.nimbus.NimbusLookAndFeel;

UIManager.setLookAndFeel(new NimbusLookAndFeel());

Frame {
  title: "BorderPanel Mini-Example"
  height: 300
  width: 480
  visible: true
  content:
    BorderPanel {
      top:
        Button {
          text: "top"
        }
      center:
        Button {
          text: "center"
        }
      left:
        Button {
          text: "left"
        }
      right:
        Button {
          text: "right"
        }
      bottom:
        Button {
          text: "bottom"
        }
    }
}

Here a screenshot of the application:

Borderpanelmini


The Brand-New Nimbus Look & Feel

In my I Hear Voices blog post I mentioned the Consumer JRE project, which is now called Java SE 6 Update N.  According to this article by Chet Haase, this initiative has six main items that primarily address deployment and performance issues:

  • Quickstarter. Radically reduce the startup time for Java applications and applets.
  • Java Kernel. Reduce the time to install and launch when the user needs to install the JRE in order to run an application.
  • Deployment toolkit. Enable easy detection and installation of the JRE.
  • Installer improvements. Improve the user experience of installation.
  • Graphics performance on Microsoft Windows. Enable default graphics acceleration for simple and advanced 2D rendering.
  • Nimbus look and feel. Release a new cross-platform look and feel based on Synth.

I believe that this initiative will help enable the success of JavaFX. The last item mentioned is the Nimbus Look and Feel, which I think is very attractive. The screenshot above gives a taste of the Nimbus Look and Feel, and the code example shows how to implement it in JavaFX Script programs. You'll need to download the latest Java SE 6 Update N early access release in order to use the Nimbus Look and Feel.

About James L. Weaver
James L. (Jim) Weaver is founder and president of jMentor, formed in 2000 to provide Java programming-related training to companies and individuals. He has served as a system architect and developer for over 25 years, specializing in leading-edge software development. His specialties include Java, object-oriented, and web-based technologies. He has authored books on the Java programming language, including most recently JavaFX Script, published by Apress.

LATEST JAVA STORIES & POSTS
Sun Challenges Linux
Sun's mule train has finally pulled into Indiana after three years on the road. Indiana is the Linux-friendly Fedora-like OpenSolaris project meant to move the Solaris-shy Linux community off Linux and on to Solaris tempted by Solaris widgetry like the highly scalable, rollback-e
Premiere Global Opens New Markets With FioranoMQ
Fiorano Software announced that Premiere Global Services, a global provider of on-demand business process improvement solutions chose FioranoMQ to enhances its e-mail marketing product lines with higher response rates, instant consumer actions and direct results tracking.
Chris Keene's Prescription for Curing the Java Flu
At WaveMaker, we have hitched our wagon to Java so I hope very much that JavaOne is showing us the ghost of Java present, not the ghost of Java to come. The Sun promise to put Java runtimes everywhere is meaningless if nobody wants to develop for those runtimes. Adobe and Microso
Virtualization Journal Attracts JavaOne Attendees to SYS-CON Media Booth
Virtualization Journal now reaches more than 60,000 online readers with monthly digital editions and weekly newsletters. The premier issue of the magazine's print edition, which debuts on May 6, 2008, at JavaOne in San Francisco, as a media sponsor of this event, will be availabl
Real-Time Kaazing Solution and Sun's Glassfish Forge RIA Alliance
Kaazing Corporation and Sun Microsystems announced an alliance to deliver the scalable and advanced real-time Web 2.0 platform. The integration between Kaazing's real-time Rich Internet Application (RIA) solution, Enterprise Comet, and Sun Microsystems' open source Java EE applic
AJAX World - Sun Talks Up its Late-to-the-Party AIR-Silverlight Rival
At Java One this week Sun has been selling its year -old-but-still-upcoming - and definitely late-to-the-party - Adobe AIR- and Microsoft Silverlight-competitive JavaFX Rich Client environment as a potential revenue-generator capable of putting ads on mobile applications and JavaF
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING JAVA NEWS
Zodiac Interactive Demonstrates Tru2way(TM) Technology at The Cable Show '08
Zodiac Interactive, a multiple Emmy-nominated and Emmy award-winning  developer of