Categorized | Web 2.0

JavaFX: The preview has landed

JavaFX was announced at JavaOne.... in 2007, and we are now seeing a preview release.

Josh Marinacci of the JavaFX team put together a post with an example that builds the following:

The code for this is simply:

JAVA:
  1.  
  2. package blogdemo;
  3.  
  4. import javafx.scene.*;
  5. import javafx.scene.paint.*;
  6. import javafx.scene.geometry.*;
  7. import javafx.application.*;
  8. import javafx.scene.transform.*;
  9. import javafx.input.*;
  10. import javafx.animation.*;
  11. import java.lang.System;
  12.  
  13. var angle = 0.0;
  14.  
  15.     windowStyle: WindowStyle.TRANSPARENT  visible: true
  16.     width: 400 height: 400
  17.     stage: Stage {
  18.         fill: null
  19.         content: Group {
  20.             translateX: 100 translateY: 100
  21.             content: for(i in [0..10]) {
  22.                 // here is the magic with binding
  23.                 Rectangle {
  24.                     fill: Color.rgb(25*i,0,0, i/10.0)
  25.                     width: 100 height: 100 arcHeight: 10 arcWidth: 10
  26.                     stroke: Color.BLACK strokeWidth: 5
  27.                     transform: bind [
  28.                         Transform.rotate(-i*36+angle/2,50,50),
  29.                         Transform.translate(angle/4,0),
  30.                     ]
  31.                 }
  32.             }
  33.             onMousePressed: function(e:MouseEvent):Void { System.exit(0); }
  34.         }
  35.     }
  36. }
  37.  
  38. var anim = Timeline { keyFrames: [
  39.         KeyFrame { time: 0s values: angle => -360 tween Interpolator.EASEBOTH },
  40.         KeyFrame { time: 2s values: angle => 360 tween Interpolator.EASEBOTH },
  41.     ]
  42.     autoReverse: true
  43.     repeatCount: Timeline.INDEFINITE
  44. };
  45. anim.start();
  46.  

And you can check out the application if you have Java 1.6 installed.

Michael Coté got together with the Sun folks and recorded a demo and interview:

I am interested to see what Sun does with JavaFX, but I have to admit to being underwhelmed and more excited about what Sun could do with the Java plugin and have that as a way to interact with Ajax applications.

23 Responses to “JavaFX: The preview has landed”

Trackbacks/Pingbacks

  1. Symptoms Of Low Vitamin D…

    Sites of interest we have a link to…

  2. Yosezd says:

    2011…

    My brother suggested I might like this web site. He was entirely right. This post truly made my day. You cann’t imagine just how much time I had spent for this info! Thanks!…

  3. dating site icebreakers…

    we came across a cool site that you might enjoy. Take a look if you want…

  4. Great website……

    [...]here are some hyper-links to sites that we link to as we feel they are really worth browsing[...]……

  5. Trackback for a Great Article……

    [... ]Left you a trackback for your readers to get more info[... ]………

  6. Related………

    [... ]just beneath, are numerous totally possibly not related sites to our bait, however, they are absolutely worth going over[... ]………

  7. Related………

    [... ]just beneath, are numerous totally possibly not related sites to our bait, however, they are absolutely worth going over[... ]………

  8. Sources……

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]………

  9. Sources……

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]………

  10. Links……

    [...]Sites of interest we have a link to[...]………

  11. Sources……

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]………

  12. Sources……

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]………

  13. Great website……

    [...]here are some hyper-links to sites that we link to as we feel they are really worth browsing[...]……

  14. Links……

    [...]Sites of interest we have a link to[...]………

  15. The best website………

    [...]here are some links to sites that we link to because we think they are worth visiting[...]………

  16. Trackback for a Great Article……

    [... ]Left you a trackback for your readers to get more info[... ]………

  17. Recommeneded websites……

    [...]Here are some of the sites we recommend for our visitors[...]………

  18. Related………

    [... ]just beneath, are numerous totally possibly not related sites to our bait, however, they are absolutely worth going over[... ]………

  19. Links……

    [...]Sites of interest we have a link to[...]………

  20. tatuaggi says:

    … [Trackback]…

    [...] Find More Informations here: utropicmedia.net/blog/javafx-the-preview-has-landed [...]…

  21. Kansas City says:

    … [Trackback]…

    [...] Read More here: utropicmedia.net/blog/javafx-the-preview-has-landed [...]…

  22. James says:

    … [Trackback]…

    [...] Find More Informations here: utropicmedia.net/blog/javafx-the-preview-has-landed [...]…

  23. … [Trackback]…

    [...] There you will find 66465 more Infos: utropicmedia.net/blog/javafx-the-preview-has-landed [...]…


Leave a Reply