| By James L. Weaver | Article Rating: |
|
| December 4, 2007 03:45 AM EST | Reads: |
8,812 |
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,812
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By 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.
- Ulitzer News: Search vs New Media
- Publishing Synergy: Blog, Twitter and Ulitzer
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- GovIT Expo Highlights Cloud Computing
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ubuntu-based Open Source Linux Mint Tests KDE Version
- Ulitzer Aid Campaign for the Typhoon Ondoy Victims
- Cloud Computing Can Revitalize Your Career as Software Developer
- Virtualization Journal "Readers' Choice Awards" Voting Is Now Open
- Yahoo! SVP Shelton Shugar to Discuss Innovation at Cloud Computing Expo
- Einstein, Sharks and Clouds: IT Security in the Cloud
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- 1st Annual GovIT Expo: Letter from the Technical Chair
- Ulitzer News: Search vs New Media
- Publishing Synergy: Blog, Twitter and Ulitzer
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- GovIT Expo Highlights Cloud Computing
- Confessions of a Ulitzer Addict
- Twitter, Linked In, Ning and Ulitzer: Easy Personal Branding Strategy
- The End of IT 1.0 As We Know It Has Begun
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- The i-Technology Right Stuff
- Linux.SYS-CON.com Exclusive: Linus Discloses *Real* Fathers of Linux
- After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly
- Linus' Top Ten SCO Barbs
- A Closer Look at Damn Small Linux
- Netscape Co-Founder's 12 Reasons for Growth of Open Source
- Introducing "Cooperative Linux" - Linux for Windows, No Less
- *POINT - COUNTERPOINT SPECIAL* What's Wrong with the Open Source Community?
- Where Are RIA Technologies Headed in 2008?
- Linux.SYS-CON.com Exclusive: What Would UserLinux Look Like?
- i-Technology Viewpoint: The New Paradigm of IT Buying
- Is Linux Desktop-Ready Yet...or Not?



































