| By James L. Weaver | Article Rating: |
|
| December 4, 2007 03:45 AM EST | Reads: |
11,678 |
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 11,678
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.
- Ubuntu-based Open Source Linux Mint Tests KDE Version
- Linux Virtualization and Tired Open Source Myths
- IGEL Supports Red Hat Enterprise Virtualization 3.0
- CloudLinux Announces Support for Atomia
- Amazon Kindle Fire Gets Its Own 'Personal Cloud Desktop' with AlwaysOnPC App Launch
- SPIRIT DSP Receives 2011 INTERNET TELEPHONY Product of the Year Award
- Hadoop Quickstart: Use Whirr to automate standup of your distributed cluster on Rackspace
- Jury Gets Novell Antitrust Case Against Microsoft
- The Utility Infrastructure Security Market 2012-2022: Cybersecurity & Smart Grids
- FORTUNE Magazine Names Rackspace Among “100 Best Companies to Work For”
- EnterpriseDB Announces Availability of Postgres Plus Cloud Database
- iFollowOffice Turns to Virtual Bridges and Savvis for On-Demand Virtual Desktop Services
- i-Technology in 2012: Five Industry Predictions
- Ubuntu-based Open Source Linux Mint Tests KDE Version
- Amazon to Rent Out Supercomputers
- Amazon Émigré Starts Network Monitoring Firm
- HP’s Putting a Back Door in the Itanium Alamo
- Linux Virtualization and Tired Open Source Myths
- CloudLinux Announces Preferred Partner Program
- MapR Pushes the Hadoop Envelope
- Rightware Announces Gaming Performance Benchmark for OpenGL ES 3.0/Halti
- IGEL Supports Red Hat Enterprise Virtualization 3.0
- CloudLinux Announces Support for Atomia
- 3Dconnexion Announces its Newest 3D Mouse - the SpaceMouse Pro
- 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
- A Closer Look at Damn Small Linux
- Linus' Top Ten SCO Barbs
- SCO CEO Posts Open Letter to the Open Source Community
- Netscape Co-Founder's 12 Reasons for Growth of Open Source
- Where Are RIA Technologies Headed in 2008?
- *POINT - COUNTERPOINT SPECIAL* What's Wrong with the Open Source Community?
- Introducing "Cooperative Linux" - Linux for Windows, No Less
- Linux.SYS-CON.com Exclusive: What Would UserLinux Look Like?
- Why Recovering a Deleted Ext3 File Is Difficult . . .



















