« Spotting JavaFX Apps in the Wild - A Freebase Browser | Main | Let's Visit Planet JFX and Explore Binding a Little More! »

October 29, 2007

Comments

James Weaver

Joseph,

Excellent point! I'll make sure that we cover event handling in future posts.

Thanks,
Jim Weaver

Joseph Montanez

I'm sure people will want to get into event handeling, so here is a little code extension on what happens if the click on the text.

Text {
font:
Font {
...some code omitted...
}
// Put some color into the app
stroke: red
fill: red
x: 10
y: 10
content: bind hellojfxModel.greeting
onMouseClicked: operation (CanvasMouseEvent) {
//-- do something like print click
//-- make sure you have import System.out.*; before hand
println("Clicked");
}
}

The comments to this entry are closed.

Categories