In this very detailed article that will be published in the November/December edition of Oracle Magazine (available online now), Java Champion Jim Weaver walks you through the process of creating a custom layout manager for JavaFX. Included with the article is a sample project that will let you step through a tutorial with ease to learn how these concepts can be applied. From the article itself
"This article introduces some of the built-in layout managers included
with JavaFX 1.3 and shows you how to extend layout management to include
a unique custom layout. The article steps through a sample application
that manipulates images of playing cards"
To learn more about layout managers in JavaFX 1.3 and to try out the tutorial, check out Jim Weaver's excellent article here.
Attention New York area developers! Oracle has just announced a free, full-day developer event. Being held at the Millennium Broadway Hotel, the Oracle Developer Day will include four tracks of sessions and hands-on-labs designed for developers interested in Mobile, Desktop, Embedded, and Server topics. Technologies covered include Java ME, Java EE, and Java SE (including the JDK). From the event page:
Come
to this event if you are interested in:
Evaluating the Java platform, or using other
languages on the JVM
Building server side Java
Constructing Rich Web or Desktop Applications
Creating Mobile Applications
Making Smart Devices even smarter
Check out the event page to read more and/or register!
As you are most likely aware, Oracle announced at JavaOne 2010 that JavaFX Script was being replaced with a pure Java API. This transition brings the following benefits:
Allow the use of powerful Java features such as generics,
annotations, and multi-threading
Make it easier for Web developers to use JavaFX from other
popular dynamic languages such as JRuby, Groovy, and JavaScript
Allow Java developers to use other system languages such as
Scala which run on the JVM for writing large or complex JavaFX
applications
However, there are a number of developers that are sad to see JavaFX Script go away and to this end, Stephen Chin has announced Project Visage. Reading Jim Weaver's blog yesterday, I noticed a post that project Visage has released the first preview of its new compiler. Check it out and let them know what you think. And if you are so inclined... contribute some code!
Tonight, the Silicon Valley JavaFX User Group is hosting a talk on JavaFX 2.0 presented by Richard Bair and Jai Suri from the JavaFX product team. From the event website:
"In this session, members of the JavaFX product team share key
information about the direction of JavaFX. Come hear about the latest
developments in JavaFX and view firsthand demos and samples illustrating
the new capabilities of the platform."
The event is being hosted by Oracle at the Oracle Conference Center in Redwood Shores. There are still a few seats remaining in the room, so if you would like to attend go ahead and register here. If you are remote or would prefer to join from home, you can view a livestream and you can even participate and ask questions from afar!
The Silicon Valley JavaFX User Group also archives past presentations so if you miss this one, or would like to view a previous meetup, you can check out the archives.
The energy level here at the San Francisco Hilton is electric as JavaOne 2010 has officially kicked off! The first technical sessions kicked off this morning and there is a huge amount of anticipation around the JavaOne Opening keynote tonight. If you were not able to join us live here in San Francisco, there are a couple of ways that you can follow-along from afar. First, Oracle Technology Network is streaming 3-4 hours of live interviews (see schedule) throughout the week with technologists from Oracle and Oracle partners. In addition, there will also be live streams for all of the keynotes available at the same URL. So grab a beverage of your choice, sit back, and enjoy the show!
In this excellent article, you will learn about some of the experiences the team went through as they were building the application, some of the technologies they used, and of course how to build, configure, and you the application. Check it out today!
JavaOne is here again and this year there will be plenty of JavaFX-related material. With over 30 sessions, there are a plethora of development tips and real work examples to inform and inspire you. Find out how Major League Baseball uses JavaFX, or how it can be used to help doctors or even to rescue workers in the field! There will also be plenty of sessions on using the latest platform features and improving your designer-developer workflow.
In addition, be sure to stop on by the JavaFX pods at the DEMOgrounds to see demos of the latest JavaFX apps and to ask questions of the team! You can also learn what our engineers have under wraps for the next major release of JavaFX during the Monday 10:00 AM opening session of the JavaFX and Rich User Experience track. Visit our JavaOne page on JavaFX.com for the complete list of JavaFX sessions
The Java team has released JavaFX 1.3.1 to improve the development of client-side Java applications. Version 1.3.1 includes a number of important enhancements along with a number of bug fixes and new documentation.
In addition, NetBeans 6.9.1 is also available now and includes support for the latest version of the JavaFX SDK. Here are some of the key JavaFX improvements:
Start-up Improvements: JavaFX 1.3.1 includes a new customizable progress indicator and leverages enhancements in Java SE update 21. The progress indicator can help provide an indication to the end-user of how much time is left in the start-up process. To learn more about optimizing the start-up experience, please review the new JavaFX Application Startup Experience tutorial
Improved Debugging: NetBeans 6.9.1 adds support for the JavaFX 1.3.1 SDK and delivers a number of debugging-related enhancements
Jim Weaver has written a great article on using CSS support in JavaFX 1.3 to stylize client-side user interfaces. In his words:
"One of the hallmark features of JavaFX 1.3 is the introduction of
JavaFX CSS, which provides the ability to apply styling to any element
in the user interface. This article focuses on JavaFX Cascading Style
Sheets (CSS), which is primarily the domain of designers but is also
important for developers to understand.
One of the strengths of JavaFX is that it enables designers and
developers to collaborate on creating applications. JavaFX CSS is a
feature of JavaFX that encourages this collaboration. As with
traditional Web applications, developers can focus on an application's
functionality while designers can apply styles to elements of the user
interface."
To read more about using CSS with JavaFX 1.3, check out his article entitled, "Stylin' with JavaFX"
Absolutely thrilled that we have announced that MLB is using JavaFX to deliver several fantasy baseball applications for this year's baseball season. JavaFX enabled MLB.com to leverage its existing Java platform experience
and skills to create, maintain and support rich client applications.
JavaFX brings control back to development teams by giving them an environment and tools that are familiar and accessible, and reduces the dependency on third-party flash developers. Additionally, by using Java on both the server and the client provides a cleaner, more integrated development architecture that allows developers to be more efficient and create better applications.
MLB.com has always been viewed as a technology leader and innovator and
their choice of JavaFX is yet another example of this leadership and we
certainly view it as a strong endorsement of the technology. Let's play ball!
Improved JavaFX API documentation is now available on the web. This update includes a new CSS Reference Guide, improved summary documentation for several common packages, and improved class documentation for several preview classes.
New CSS Reference Guide. This guide includes an overview description of how CSS styles are applied to nodes in the scene graph and the various different CSS types that exist. For each Node class, the guide lists the CSS properties that can be applied to that class.
Improved package summary documentation. To view the package summary documentation, start at the main API page. This page has a listing of all the JavaFX packages and shows a one-line summary for each. Click the disclosure arrow to reveal the summary documentation for that package. Summary documentation has been greatly improved for several important packages, specifically the following:
Improved documentation for preview classes. To access the documentation for the preview classes, expand com.javafx.preview.control and com.javafx.preview.layout in the left nav bar of the API documentation.
I had meant to post this awhile back, but somehow neglected to do so. But, better late than never, right?
If you haven't already run across this excellent blog post by JavaFX architect Richard Bair entitled, "How to Embed Fonts" then I recommend you check it out. With this very informative posting you'll see how easy it is to use custom fonts within your JavaFX applications. Now, get out there and build something great!
If you answered YES to this question, you might be interested in checking out this excellent article written by the JavaFX team entitled, "Tips for Developing to the JavaFX TV Platform." And with the new JavaFX TV emulator included in JavaFX 1.3, you'll be able to build and prototype TV applications directly on your Windows-based desktop.
In addition to performance, two of the other areas where we delivered significant improvements with JavaFX 1.3 included UI controls and CSS support. In fact, some of the great improvements we saw in performance derived from the significantly improved CSS support within UI controls that was included in this release.
To help you better leverage the new UI controls in JavaFX 1.3 and to take advantage of CSS skinning to customize and stylize your content, the JavaFX team has put together an excellent guide entitled, "Using JavaFX UI Controls" that promises to answer all of your burning questions including how to add effects and animation to your controls, understanding layout, using CSS stylesheets, and also gives you a comprehensive guide to using controls with JavaFX including new controls such as Tooltips & password box as well as existing controls such as text-box, radio buttons and more. Check it out and let us know what you think!
We're very excited to announce the immediate availability of the JavaFX 1.3
platform. This release represents an important upgrade to the product and
delivers a range of performance and functional improvements, including:
New and enhanced support for UI
controls, CSS skinning, and programmatic layout
Performance improvements in the
JavaFX Runtime
New NetBeans IDE 6.9 Beta with improved editing and an updated JavaFX Composer plug-in
New features
and enhanced
performance in JavaFX Production Suite
A native JavaFX font family
called Amble
Support for the development of
TV applications, including a new TV emulator
Availability of the mobile
emulator on the Mac platform
It
might be hard to believe that JavaFX has only been in the market for less than one and a half years, it certainly is for us! In that time, we've built out the
foundation for mobile with a deployment ready runtime, delivered a library of
UI controls to make it substantially easier to build out consistent user
interfaces, and were able to entice developers to download over 400,000 copies
of our tools by our 1.2 release. We've released a beta of the JavaFX Composer to provide
visual-editing for form-based UIs with an exceptionally positive response and
seen the community rally around the platform with projects like JFXtras, numerous blogs, and over
a dozen
books. We've also been very excited to see companies like the
Vancouver Organizing Committee for the 2010
Olympic and Paralympic Winter Games adopting the technology for commercial
products and services, and we've got another well-known customer that we're
excited to start talking to you about shortly!
But
lets get back to the JavaFX 1.3 release. As we began working with some of
these high-profile customers, we found they were really pushing the limits of
JavaFX. Since our 1.2 release we've spent a lot of time carefully
evaluating our performance goals to meet the needs of these customers and have
heavily optimized in the following areas:
Bind performance: 2-3x faster
Applet start-up time: 20%
faster (with Java SE 6u18+)
Text Rendering: 5-10x faster
(frames per second/FPS)
Highly complex animations: up
to 10x faster (FPS)
Memory usage: 20-33% reduction
(real-world apps, w/ Java SE 6u18+)
UI Controls: 50% faster, 33%-50% less memory (typical)
Lets
take a quick look at a few of these. Binding has
often been described as one of the more powerful features in JavaFX, but many
developers found they had to use it sparingly due to performance
considerations. In JavaFX 1.3 we've implemented substantial improvements
in the way JavaFX handles binding and have seen tremendous payoffs, in
particular with applications that make heavy usage of this feature.
Start-up
time is another area where we've made substantial improvements. First,
it's important to understand that we measure start-up time in two ways.
We measure both cold-start (the first time a user loads an applet, includes
download and initialization) and warm-start (subsequent launches of the applet). Cold-start is critical, because it's the user's first
impression and it's also where we've achieved the most improvements with
1.3. To improve start-up time, we implemented a number of optimizations
throughout the stack, including the JRE and the JavaFX runtime. Basic
applications running on systems with a recent version of the JRE (Java SE
6u18+) launch 20% faster and complex applications start nearly twice as
fast! Obviously your mileage will vary depending on the specifics of your
application.
Animation
performance has been another area of focus in JavaFX 1.3. In one of our
more extreme benchmarks, we applied animations to 900 objects
simultaneously. In JavaFX 1.2 this would have resulted in a paltry 6
FPS. With JavaFX 1.3 we are now seeing an impressive 67 FPS - that's over
10x faster! Unless you are using a ton of objects in your application you
probably won't see this kind of performance gain but we've effectively removed
animations as a performance bottleneck so developers can use them much more freely in their applications. A similar benchmark with 500 animated objects managed to
deliver a 5x improvement.
A key area of focus in JavaFX 1.2 was to deliver UI controls to make it
easier for developers to build great looking user interfaces. This effort was very well received by the community and has actually become one of the most requested areas for continued improvement! To this end, UI Controls
have continued to be a major area of focus for us with JavaFX 1.3. With 1.3, we have
added and/or substantially upgraded 9 controls and have released previews for
an 8 additional controls for developers to begin experimenting with in their
applications. In addition, we have rewritten all of the existing UI
controls to take full advantage of the new CSS support in JavaFX, making them
simpler, more powerful and highly customizable. Our UI controls improvements
have also yielded substantial performance gains, in particular with
applications that make heavy usage of UI controls such as enterprise-class applications. While applications that use complex UI controls (such as ListView & TreeView) will be 150%
faster, and consume up to 50% less memory, we achieved substantially better performance with
more complex applications. For example, a 1.3 application with 200 controls uses 50-80% less memory, starts nearly
twice as quickly, and runs 50% faster (comparisons are with 1.2). For developers who might have used
UI controls sparingly in the past and/or avoided using JavaFX for applications
that required a substantial number of UI controls, JavaFX 1.3 really opens the
door to a range of new use-cases.
There's a lot more we could say about this release (and we will), but for now head
over to the download page, get a copy of the new SDK, and try it today!