About this siteFeed sources and resources
unknown (71)
2008 November 20 (9)2008 November 19 (3)2008 November 18 (2)2008 November 17 (5)2008 November 16 (1)2008 November 14 (3)2008 November 13 (3)2008 November 12 (3)2008 November 11 (10)2008 November 10 (6)2008 November 09 (1)2008 November 08 (4)2008 November 07 (2)2008 November 06 (6)2008 November 05 (3)2008 November 04 (3)2008 November 01 (1)2008 November 03 (1)
2008 October 31 (2)2008 October 29 (2)2008 October 28 (3)2008 October 27 (4)2008 October 26 (1)2008 October 24 (2)2008 October 22 (4)2008 October 21 (4)2008 October 20 (5)2008 October 17 (2)2008 October 16 (2)2008 October 15 (3)2008 October 14 (2)2008 October 13 (2)2008 October 11 (1)2008 October 10 (2)2008 October 08 (2)2008 October 07 (2)2008 October 06 (2)2008 October 03 (2)2008 October 01 (2)2008 October 23 (1)2008 October 09 (1)2008 October 02 (1)
2008 September 26 (2)2008 September 25 (3)2008 September 24 (2)2008 September 21 (2)2008 September 16 (1)2008 September 13 (1)2008 September 12 (9)2008 September 11 (10)2008 September 10 (6)2008 September 09 (7)2008 September 08 (5)2008 September 07 (2)2008 September 06 (3)2008 September 05 (6)2008 September 04 (7)2008 September 03 (5)2008 September 02 (4)2008 September 01 (6)2008 September 30 (1)2008 September 29 (1)2008 September 23 (1)2008 September 22 (1)2008 September 19 (1)2008 September 18 (1)
2008 August 31 (4)2008 August 30 (2)2008 August 29 (9)2008 August 28 (6)2008 August 27 (21)2008 August 26 (9)2008 August 25 (7)2008 August 24 (3)2008 August 23 (2)2008 August 22 (8)2008 August 21 (18)2008 August 20 (14)2008 August 19 (21)2008 August 18 (16)2008 August 17 (8)2008 August 16 (9)2008 August 15 (6)2008 August 14 (10)2008 August 13 (13)2008 August 12 (12)2008 August 11 (13)2008 August 10 (6)2008 August 09 (6)2008 August 08 (7)2008 August 07 (15)2008 August 06 (15)2008 August 05 (24)2008 August 04 (65)2008 August 03 (19)2008 August 02 (23)2008 August 01 (62)
2008 July 31 (87)2008 July 30 (12)2008 July 29 (10)2008 July 28 (4)2008 July 27 (13)2008 July 26 (3)2008 July 25 (3)2008 July 24 (2)2008 July 23 (4)2008 July 22 (11)2008 July 21 (1)2008 July 20 (20)2008 July 19 (3)2008 July 18 (3)2008 July 17 (5)2008 July 16 (6)2008 July 15 (14)2008 July 14 (8)2008 July 13 (2)2008 July 12 (2)2008 July 11 (5)2008 July 10 (17)2008 July 09 (1)2008 July 08 (6)2008 July 07 (11)2008 July 06 (1)2008 July 05 (4)2008 July 03 (5)2008 July 02 (3)2008 July 01 (14)

This Ain't Your Dad's Java! : JavaFX Blog  (blogs.sun.com)  

Create a Menu Bar with JavaFX  (www.devx.com)  

Call for Papers: Mobile and Embedded Developer Days #2  (weblogs.java.net)  

After the very successful first installment of the Java Mobile & Embedded Developer Days in January of this year ... we're doing it all over again! Same format, same location, but expanded topic coverage - now including media as well...

Sun to lose lunch money on JavaFX | The Register  (www.theregister.co.uk)  

ongoing ? Mobility Blues  (www.tbray.org)  

"The big problem is this: I don't wanna be a sharecropper on Massa Steve's plantation. I don't want to write code for a platform where there's someone else who gets to decide whether I get to play and what I'm allowed to sell"

News summary: JavaFX Preview SDK, new SDN articles  (weblogs.java.net)  

A couple of news items have piled up over the last few days that I briefly want to bring to your attention: The JavaFX Preview SDK was announced two weeks ago. Check out the announcement on the JavaFX blog....

Way to save $$$: Mobile IM w/Java ME tech cheaper than SMS  (blogs.sun.com)  

Lots of developers and wireless consumers are finding out that it is cheaper to use Java ME technology for IM mobile apps on their cell phones than to use SMS text messaging on certain carriers who charge an arm and a leg. Twitter recently decided to end their SMS support in the UK because of this.

And, here's an article about how the Java ME tech-enabled MXit app in South Africa is letting mobile users communicate much better with each other (and those on PCs) than by using the more costly SMS text messaging on their mobile phones.

See:

Cheaper to use Java ME

Here's a quote:

 To access MXit, the cellphone 
 has to have Internet access, be 
 a GPRS (general radio service) 
 and 3G-enabled cellphone with 
 java viewing software support.
Java ME technology saves you money! I knew there was a good reason to write mobile apps in Java. :-)

Motion of Ball Under Gravity - JavaFX  (blogs.sun.com)  

As written in the last blog, now we can use those MotionBall into giving some kind of motion. Here I have tried to give a simple motion of ball under gravity. After every hit there is an energy dissipation and the ball will slow down at end. The colors of balls, initial positions and radius are all random but under a constraint. 

Now, the motion of the balls should get called in timeline. Like this:

 var timeline = Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames : [
        KeyFrame {
            time : 16ms
            action: function():Void {
                for(ball in balls) {
                    ball.motion();
                }
            }
        }
    ]
}

Here is the final code. I tried to write the value as generic as possible but pardon me if there is some hardcoded value written somewhere :

import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.geometry.*;
import javafx.animation.Timeline;
import javafx.animation.KeyFrame;
import javafx.scene.paint.*;
import javafx.application.Frame;
import javafx.application.Stage;
import javafx.scene.effect.*; 

// Java Legacy
import java.lang.Math;
import java.util.Random;
import java.lang.System;


var balls:GravityBall[];
var gravity:Number= 0.1;
var width:Number = 1200;
var height:Number= 500;
var dampFactor: Number = 0.9;
 
var timeline = Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames : [
        KeyFrame {
            time : 16ms
            action: function():Void {
                for(ball in balls) {
                    ball.motion();
                }
            }
        }
    ]
}

var rnd : Random = new Random();

for( i in [1..5] ) {
    insert GravityBall {
        x : rnd.nextInt( 100 ), y :  rnd.nextInt( 300 ), radius : rnd.nextInt( 10 ) + 20
        color : Color.rgb(rnd.nextInt(255),rnd.nextInt(255),rnd.nextInt(255))
        , opacity : 0.9
    } into balls;
}    


var rect = Rectangle {
    x: 0, y: 500
    width: 1200, height: 10
    fill: LinearGradient {
        startX: 0.0
        startY: 0.0
        endX: 1.0
        endY: 0.0
        proportional: true
        stops: [
            Stop { offset: 0.0 color: Color.TRANSPARENT },
            Stop { offset: 1.0 color: Color.WHITESMOKE }
        ]

    }
}
Frame
{
 
    title: "MyApplication"
    width: 1200
    height: 732
    closeAction: function() { java.lang.System.exit( 0 ); 
    }
    visible: true

    stage: Stage {
        fill : Color.BLACK
        content: [
            balls,
            rect
        ]
    }
}

timeline.start();

public class GravityBall extends CustomNode {

    public attribute x : Number;
    public attribute y : Number;
    public attribute radius : Number;
    public attribute color : Color;
    public attribute velocity : Number;
 
    public function motion(): Void {
        velocity += gravity;
        x += 1;
        y += velocity;
 
        if(x + radius > width ) {
            x = width - radius; //for ending at the boundary
        }
        if( y + radius > height ) {
            y = height - radius;
            velocity *= -dampFactor;
        }
    }
 
    public function create(): Node {
        return Circle {
            centerX : bind x, centerY : bind y, radius : bind radius
            fill: bind color
 
        };
 
    }
} 

This is small output view :


The Weekly RIA Round-Up for August 16 - InsideRIA  (www.insideria.com)  

This week brought the death of ECMAScript 4 as we know it, a preview release of YUI 3, a behind the scenes look at NBC's online olympics coverage, and did we mention ECMAScript 4 (it was worth mentioning twice)?

TableNode: Creating a Custom Scrollable Table in JavaFX | Javalobby  (java.dzone.com)  

NetBeans Wiki: JavaFXAndJDK6On32BitMacOS  (wiki.netbeans.org)  

Sun JavaFX demo and tutorals  (www.flex888.com)  

javafx demos.

Lucas Jordan's Blog: JavaFX and Adobe Illustrator  (lucasjordan.blogspot.com)  

http://javafx.com/releases/preview1/docs/api/index.html  (javafx.com)  

JDK 6 and JavaFX on 32-bit Macs  (blogs.sun.com)  

Dearest Apple. Words cannot express my feelings towards you. Therefor allow me to use punctuation and special characters: @#$%^&*!!? :-p Yours Truly.

*SIGH* If you have one of the 2006 Intel Macs with 32-bit processors, you guessed what I'm talking about: In spring '08, Apple finally released the Apple JDK 6 (or as they call it, "Java for Mac OS 10.5"), but for 64-bit processors only. And there is no sign this will change soon: On Mac hardware, Mac OS X 10.5.2 and an Intel Core 2 processor are the minimum requirements for the JDK 6 -- and also for JavaFX.

Apart from switching to Windows or Linux, or buying new hardware, the only alternative for developers who don't meet those requirements is the Soy Latte JDK 6. Using this JDK solves a few problems but also raises some others. You have to decide whether the pros out-weigh the cons in your work situation:

Pro

  • You can use the JavaFX SDK on top of the SoyLatte JDK
  • IDEs like NetBeans work with SoyLatte (you're not stuck on the command line)
  • No need to buy new hardware for JDK 6 / JavaFX development

Con

  • Must use X11 whose user-interface needs getting used too (shortcuts, menus).
  • Installation is less straight-forward than installing the Apple JDK
  • No support for Java Web Start (javaws) yet

I tried it out at home over the weekend, and kept notes, so if you too want to set up the SoyLatte JDK and JavaFX on a 32-bit Mac, have a look at this tech tip and leave a comment what you think.

Learning Curve Journal, Part 4: Accessing a Web Service  (java.sun.com)  

Learning Curve Journal, Part 4: Accessing a Web Service