| By James L. Weaver | Article Rating: |
|
| February 21, 2008 06:30 AM EST | Reads: |
10,163 |
Here's a sample program that uses the WinnerWheelJFX component:
/*
* WinnerWheelExample.fx - A JavaFX example
* of using a custom component
*
* Developed 2008 by James L. Weaver
* (jim.weaver at lat-inc.com)
*/
import javafx.ui.*;
import java.lang.System;
Frame {
var winnerWheel =
WinnerWheelJFX {
names: [
"Aaaaaaaa Aaaaaa",
"Bbbbbbbb Bbbbbb",
"Cccccccc Cccccc",
"Dddddddd Dddddd",
"Eeeeeeee Eeeeee",
"Ffffffff Ffffff",
"Gggggggg Gggggg",
"Hhhhhhhh Hhhhhh",
"Iiiiiiii Iiiiii",
"Jjjjjjjj Jjjjjj",
"Kkkkkkkk Kkkkkk",
"Llllllll Llllll",
"Mmmmmmmm Mmmmmmmmmmm"
]
}
title: "Winner Wheel JFX"
height: 750
width: 800
resizable: false
visible: true
content:
Canvas {
background: Color.WHITE
content: winnerWheel
}
onClose:
function():Void {
System.exit(0);
}
}
Compiling and Running this Example
Use the normal commands to compile and run this example, but since there are two source files, to compile them you'll want to use a wildcard as shown below:
javafxc *.fx
To run the example, use the following command:
javafx WinnerWheelExample
Give it a whirl!
JavaFX Script Boot Camp Announcement
As a heads-up, I will be offering a JavaFX Script 2.5 day "boot camp" on Wednesday, April 9 through Friday, April 11, 2008 (ending at noon) in Indianapolis, Indiana. This course is designed to get you quickly up to speed in JavaFX Script application development. A primary reference for this course is my JavaFX Script book, but the course has its own syllabus which includes material covered in the book as well as up to the minute developments in compiled JavaFX Script. Registration will open soon, and for this pilot class I am accepting 12 students.
The cost of this pilot class will be 900 USD per student. Additional students from the same organization will be 600 USD. You'll need to bring your laptop computer with the latest versions of the JavaFX Script downloads (which I'll specify in more detail as the class date approaches). The prerequisite for the class will be the completion of a JavaFX Script programming assignment that I'll post soon to this weblog. I'm looking forward to teaching this class and hope that you can attend!
More details to follow.
Published February 21, 2008 Reads 10,163
Copyright © 2008 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.
![]() |
Tattoo Designs 07/24/08 07:03:37 PM EDT | |||
Interesting little idea. I'd like to see it made into a more useful example, or used for a more practical purpose. |
||||
![]() |
MICR Toner 06/23/08 01:51:54 AM EDT | |||
So, this is sort of like a wheel of fortune interface for random selection of a bunch of names we can enter? I'll try it out. It could come in handy one day. |
||||
- Kindle 2 vs Nook
- Is Cloud Computing Like Teenage Sex?
- GovIT Expo Highlights Cloud Computing
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Cloud Computing Can Revitalize Your Career as Software Developer
- Ubuntu-based Open Source Linux Mint Tests KDE Version
- Yahoo! SVP Shelton Shugar to Discuss Innovation at Cloud Computing Expo
- Virtualization Journal "Readers' Choice Awards" Voting Is Now Open
- Einstein, Sharks and Clouds: IT Security in the Cloud
- Adobe Flex Developer Earns $100K in New York City
- Virtualization Expo Call for Papers Deadline December 15
- Amazon Web Services Database in the Cloud
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Is Cloud Computing Like Teenage Sex?
- 1st Annual GovIT Expo: Letter from the Technical Chair
- Ulitzer News: Search vs New Media
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Confessions of a Ulitzer Addict
- GovIT Expo Highlights Cloud Computing
- Twitter, Linked In, Ning and Ulitzer: Easy Personal Branding Strategy
- 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?

























