| By James L. Weaver | Article Rating: |
|
| December 4, 2007 03:45 AM EST | Reads: |
8,407 |
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.
/*
* 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:

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.
Published December 4, 2007 Reads 8,407
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
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.
- AJAX World RIA Conference & Expo Kicks Off in New York City
- What is Web 3.0?
- AJAXWorld RIA Conference & Expo 2009 West: Call for Papers
- AJAX and RIA 2009: More Choices, Tough Decisions
- Ulitzer’s Amazing First 30 Days in Public Beta
- SYS-CON Announces Government IT Conference & Expo
- RIAs for Web 3.0 Using the Microsoft Platform
- REA Is Where RIA Becomes the Norm
- Why an Application Grid?
- "Government IT Expo" to Highlight Cloud Computing and SOA
- AJAX World RIA Conference & Expo Kicks Off in New York City
- What is Web 3.0?
- Developing Rich Client Applications Using Swing - II
- AJAXWorld RIA Conference & Expo 2009 West: Call for Papers
- AJAX and RIA 2009: More Choices, Tough Decisions
- AJAX World RIA Conference Awards Announced
- WebORB Launched for Flex, Flash, AJAX and Silverlight
- Appcelerator Revolutionizes UI Prototyping
- Adobe Takes LiveCycle into the Cloud
- Ulitzer’s Amazing First 30 Days in Public Beta
- Building a Drag-and-Drop Shopping Cart with AJAX
- What Is AJAX?
- Google Maps! AJAX-Style Web Development Using ASP.NET
- Flashback to January 2006: Exclusive SYS-CON.TV Interviews on "OpenAjax Alliance" Announcement
- AJAXWorld Conference & Expo to Take Place October 2-4, 2006, at the Santa Clara Convention Center, California
- AJAX Sponsor Webcasts Are Now Available at AJAXWorld Website
- How and Why AJAX, Not Java, Became the Favored Technology for Rich Internet Applications
- "Real-World AJAX" One-Day Seminar Arrives in Silicon Valley
- AJAXWorld University Announces AJAX Developer Bootcamp
- AJAX Support In JadeLiquid WebRenderer v3.1








































