indiWiz.com

Subhash's Tech Log

Archive for the ‘javafx’ tag

“Hello World” (GUI) example in JavaFX

without comments

package tutorial;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;

def WIDTH = 160;
def HEIGHT = 80;
def MESSAGE = "Hello World!";

Stage {
    title: MESSAGE
    width: WIDTH
    height: HEIGHT
    scene: Scene {
        fill: Color.BLACK
        content:
            Text {
                font: Font.font("Serif", FontWeight.BOLD, 16)
                fill: Color.WHITE
                x: 10
                y: 30
                content: MESSAGE
            }
    }
}

Written by Subhash Chandran

June 8th, 2009 at 8:39 am

Posted in Java

Tagged with

Command line “Hello World!” in JavaFX

without comments

Download JavaFX SDK. Install it, and have its bin folder in your PATH.

Open your favorite text editor, and write:

println("Hello World!");
java.lang.System.exit(0);

Save the file as A.fx. To compile the code:

$ javafxc A.fx

This will generate the class file A.class. To run the application:

$ javafx A

Isn’t it simple?

Written by Subhash Chandran

June 4th, 2009 at 6:33 am

Posted in Java

Tagged with

JavaFX 1.2 for Linux, Mac and Solaris

without comments

JavaFX is now available for Linux, Solaris and Mac. Finally, now I can try this technology (I use Linux at work and home)!

Written by Subhash Chandran

June 4th, 2009 at 5:11 am

Posted in Java,news

Tagged with , ,

JFXBuilder: JavaFX Visual Design Tool

without comments

The first design tool for JavaFX is available here: http://www.reportmill.com/jfx/. The product page does not discuss any licensing or pricing detail. The current version is available as WebStart application for free use.

Written by Subhash Chandran

December 19th, 2008 at 3:37 pm

Posted in news

Tagged with , ,

JavaFX 1.0 Released

without comments

Get it! But if you are an unfortunate Linux user like me, it is not yet available for our platform :-(

Written by Subhash Chandran

December 8th, 2008 at 8:52 am

Posted in Java,news

Tagged with , , ,