Linux & JavaFX Tooling in NetBeans IDE

Follow Weiqi Gao's latest instructions (which I found out about thanks to Jim Weaver today) and you too will be able to develop JavaFX applications in NetBeans IDE, even though you're using Linux (in my case, Ubuntu):

Only Media support doesn't work yet, but that's part of the SDK, unrelated to the NetBeans IDE tooling support, which I now have working perfectly on Ubuntu.

And here's my simple code sample for today, note especially the line in bold:

import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.scene.paint.Color;
import javafx.scene.Scene;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;

var color = Color.YELLOW;

Stage {
    title: "Application title"
    width: 250
    height: 250
    scene: Scene {
        content: [
            Circle {
                centerX: 100,
                centerY: 100
                radius: 40
                fill: bind color
            }
        ]
    }
}
Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames: [
        KeyFrame {
            time: 5s
            canSkip: true
            values: [
                color => Color.GREEN
            ]
        }
    ]
}.play()

The "fill" property of the circle is bound to the "color" variable, which is used in the Timeline, changing gradually to green.

So here's how you'd make the circle move as it changes color (only the changes are in bold):

var color = Color.YELLOW;
var posX = 100;

Stage {
    title: "Application title"
    width: 250
    height: 250
    scene: Scene {
        content: [
            Circle {
                centerX: bind posX,
                centerY: 100
                radius: 40
                fill: bind color
            }
        ]
    }
}
Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames: [
        KeyFrame {
            time: 5s
            canSkip: true
            values: [
                color => Color.GREEN
                posX => 200
            ]
        }
    ]
}.play()

Similarly, you can bind the radius to a variable and then change it in the Timeline. This means the circle will become larger which, in turn, creates the impression that it is coming closer and closer to the user of the application.

Comments:

Chris, the Google sitemap plugin is working, but I can’t seem to get the xhtml sitemap page to display any links. I’ve been over and over the instructions, so I’m not sure what I’m doing wrong.

Posted by estetik on December 12, 2008 at 12:35 AM PST #

I don't know either, probably because I'm not Chris and also because I don't know what Google sitemap plugin means.

Posted by Geertjan Wielenga on December 12, 2008 at 12:40 AM PST #

very funny :)

Posted by Ramon on December 12, 2008 at 04:10 AM PST #

haha :)
i think, those should be 2008's best blog comments

Posted by xjimmor on December 12, 2008 at 07:02 AM PST #

Awesome news!!!
After Devoxx I can't wait anymore to get stated with JavaFX - but I'm an Linux user. So christmas holidays can come :-)

Posted by Stefan on December 12, 2008 at 10:06 PM PST #

JavaFX script looks really familiar :). I wonder why it was implemented to look syntactically like JS when its just an excepted fact that JS is the single MOST despised language that developers are forced to use today :)

Posted by Richard Corsale on December 13, 2008 at 05:41 AM PST #

I think tihs article is really enjoyable

Posted by videolar on March 01, 2009 at 11:21 AM PST #

thanks good share

<a href="http://www.ak-kelebek.com" title="evden eve nakliyat,evden eve nakliye,nakliyat,nakliye" target="_blank" style="color:#b9d7df;">evden eve nakliyat</a>
thanks good share

<a href="http://www.kelebeknakliyat.com" title="evden eve nakliyat,evden eve nakliye,nakliyat,nakliye" target="_blank" style="color:#b9d7df;">evden eve nakliyat</a>

Posted by evden eve naklliyat on April 21, 2009 at 02:07 AM PDT #

Hi i ned you help, i developed aplication from visualitation circle, oval, etc, and image it's represent a state of machine, for it what it best, JavaFx or NetBeans Visual Library..

Thanks

Posted by Daniel on April 27, 2009 at 09:19 AM PDT #

<a href="http://www.kelebeknakliyat.com" title=eyat,evden eve nakliye,nakliyat,nakliye" target="_blank" style="color:#b9d7df;">evden enakliyat</a>

Posted by sikiş on May 04, 2009 at 04:43 PM PDT #

thanks

Posted by sinema izle on May 13, 2009 at 09:23 AM PDT #

Congratulations again, do a good share...

Posted by konteyner on May 16, 2009 at 09:10 AM PDT #

i developed aplication from visualitation circle

Posted by Konteyner on June 06, 2009 at 01:42 AM PDT #

www.gaziogluevdenevenakliyat.com
evden eve taşıma
www.turkmenoglunakliyat.com
evden eve nakliyat
evden eve nakliye
evden eve taşıma
even eve nakliyat
istanbul ev taşımacılık
istanbul evden eve taşıma
nakliyat
nakliye
ev depolama
istanbulda nakliye firması
istanbulevdeneve
istanbul evden eve
nakliye firmaları
ucuz nakliyat
nakliye fiyatları
şehirler arası nakliyat
şehirlerarası evden eve nakliyat
şehirler arsı ucuz nakliyat
şehirler arası nakliye
şehirler arası evden eve nakliyat
şehirlerarası taşıma
şehirler arası evden eve nakliyat
şehirler arası nakliyat

Posted by evden eve nakliyat gazioglu nakliyat on June 13, 2009 at 02:11 AM PDT #

thanks for article

Posted by Medyum on June 13, 2009 at 09:39 PM PDT #

Hi i ned you help, i developed aplication from visualitation circle, oval, etc, and image it's represent a state of machine, for it what it best, JavaFx or NetBeans Visual Library..

Thanks

<a href="http://www.medyum.gen.tr">Medyum</a>

Posted by medyum on July 02, 2009 at 04:32 AM PDT #

thank you

Posted by Evden Eve Nakliyat on July 07, 2009 at 04:33 AM PDT #

i developed aplication from visualitation circle

Posted by medyumlar on July 07, 2009 at 07:53 AM PDT #

Congratulations on your nice site

Posted by vip minibüs kiralama on July 07, 2009 at 07:57 PM PDT #

Congratulations on your nice site

Posted by toplu yemek on July 07, 2009 at 11:11 PM PDT #

thanks for wrie me

Posted by evden eve nakliyat on July 10, 2009 at 03:28 AM PDT #

thanks

Posted by arkadas on July 10, 2009 at 03:29 AM PDT #

i developed aplication from visualitation circle

Posted by evden eve nakliyat on July 20, 2009 at 09:05 AM PDT #

thanks

Posted by Serkan Koçak on July 20, 2009 at 09:07 AM PDT #

you have to crawl the entire web to be a “true” search engine? Are some of these.

Posted by cam balkon on August 05, 2009 at 01:17 AM PDT #

thank you

Posted by medyum on August 05, 2009 at 02:02 AM PDT #

nakliye firmasi olarak evden eve nakliyat (evden eve taşıma) ofis taşıma, şehir içi taşıma , şehirler arası taşıma, askılı textil taşıma , ev eşyası depolama , fuar taşımacılığı ve uluslar arası lojistik hizmetleri sunmaktayız.

Posted by evden eve nakliyat on August 05, 2009 at 04:19 AM PDT #

i developed aplication from visualitation circle

Posted by evden eve nakliyat on August 22, 2009 at 11:43 AM PDT #

Thanks for this article and most generaly for this very amazing website :)

Posted by sepetli platform on February 11, 2010 at 05:49 AM PST #

Hi i ned you help, i developed aplication from visualitation circle, oval, etc, and image it's represent a state of machine, for it what it best, JavaFx or NetBeans Visual Library..

Thanks

Posted by medyum on May 21, 2010 at 12:39 AM PDT #

Hi i ned you help, i developed aplication from visualitation circle, oval, etc, and image it's represent a state of machine, for it what it best, JavaFx or NetBeans Visual Library..

Posted by güzel sözler on July 30, 2010 at 10:42 PM PDT #

use will then automatically insert the proper HTML snippet into your blog post. This plugin was inspired by Flock’s TopBar, but takes it a little

Posted by mermer lavabo on February 09, 2011 at 11:19 PM PST #

Hi i ned you help, i developed aplication from visualitation circle

Posted by gelir vergisi on March 23, 2011 at 11:43 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
24
25
26
27
28
29
30
   
       
Today