Sunday, April 13, 2008

A snippet of JavaFX

It's not bad. I've been using NetBeans and it's made it pretty easy to code and test. The dynamic preview in preview window comes in pretty handy.





..............
Frame{
title: "JavaFX Example"
width: 400
height: 400
onClose: operation(){ System.exit(0);}

content: BorderPanel {
center: bind mapKit

bottom: BorderPanel {
top: GridBagPanel {
border: CompoundBorder {
borders:
[EmptyBorder {
top: 5
left: 5
bottom: 5
right: 5
}]
}
cells:
[GridCell {
anchor: EAST
gridx: 0
gridy: 0
content: SimpleLabel {
text: "Latitude: "
}
},
GridCell {
anchor: WEST
fill: HORIZONTAL
weightx: 1
gridx: 1
gridy: 0
content: TextField {
value: bind latitude
}
},
..............


I chopped off the end to keep it brief.

Matt

0 comments: