« Check out the JavaFX Script Documentation | Main | Book Example Updated for JavaFX Script SDK: HelloJFX »

June 27, 2008

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54f133d69883400e55371489b8833

Listed below are links to weblogs that reference The JavaFX SDK Packages are Taking Shape:

Comments

Hans Kristanto

Hi!

It's a great article for me, a newbie in JavaFX. I try to run your code in Netbeans 6.7.1, but i've got so may errors. The most important error is, all the import packages are unavailable. The compiler could not found the class. Once i populate all classes, my classes are so different with you've populated in this article. I'm using JavaFX 1.2.. any clue? i really need this clue Sir.

Thank you

Jim Weaver

"Looks like I'll spend my entire long weekend trying to figure out how to make a simple 3x3 array of rectangles since GridPanel is gone huh?"

Bill,
There are a couple of options available now to create a grid of nodes
1) Use HBox and VBox, as shown in the following Create a Simple Calculator series:
http://javafxpert.com/weblog/simple-calculator-app/

2) Use the new Grid class in the JFXtras project. See the following post:
http://javafxpert.com/weblog/2008/12/jfxtras-01-release-utilities-and-addons-for-the-javafx-language.html

Regards,
Jim Weaver

Bill Thayer

Looks like I'll spend my entire long weekend trying to figure out how to make a simple 3x3 array of rectangles since GridPanel is gone huh?

Shahid

Hi James !!

It's nice to see your blog and thanks a lot for your javafx script book. It helped me a lot in uderstanding the structure for writing my basic script. I wanted to know that If I have to make a big appliaction and required handling database,logging,network,internationlization etc, then will it be suitable to use JavaFx. Can we use any existing framework like Swing application framework to support life cycle. Please help
Thanks
Shahid

Silveira Neto

I miss the TextArea component and a multi line label.

hansi

The demos won't compile outside netbeans!

First:
-do-compile:
[javac] Compiling 2 source files to /Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/Assortis/build/classes
[javac] /Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/Assortis/src/assortis/core/ProjectManager.java:136: package org.jvnet.substance.fonts does not exist
[javac] org.jvnet.substance.SubstanceLookAndFeel.setFontPolicy(org.jvnet.substance.fonts.SubstanceFontUtilities.getScaledFontPolicy(1.25f));
[javac] ^
[javac] /Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/Assortis/src/assortis/core/ProjectManager.java:136: package org.jvnet.substance does not exist
[javac] org.jvnet.substance.SubstanceLookAndFeel.setFontPolicy(org.jvnet.substance.fonts.SubstanceFontUtilities.getScaledFontPolicy(1.25f));
[javac] ^
[javac] Note: /Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/Assortis/src/assortis/core/ProjectManager.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors

BUILD FAILED
/Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/build.xml:9: The following error occurred while executing this line:
/Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/Assortis/nbproject/build-impl.xml:375: The following error occurred while executing this line:
/Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/Assortis/nbproject/build-impl.xml:172: Compile failed; see the compiler error output for details.

After commenting out the troublesome code, one gets dependencies from netbeans:
/Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/build.xml:9: The following error occurred while executing this line:
/Users/hansi/Downloads/archive/openjfx-compiler-tp1/dist/demos/BasicDND/nbproject/build-impl.xml:428: taskdef class org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs cannot be found

Jim Weaver

Coffeejolts wrote: Jim, Will the jmc.dll be included with the SDK Preview? I am dying to try it out in an app that I'm working on.

Yes, I believe that the plan is to provide the jmc.dll with the Technology Preview Release.

coffeejolts

Jim, Will the jmc.dll be included with the SDK Preview? I am dying to try it out in an app that I'm working on.

Jim Weaver

Coffeejolts wrote: "Well, I figured out part of the problem: my URI was malformed. Now, I am getting com.sun.media.jmc.MediaUnsupportedException: Unsupported media: file:/C:/test1.mp3"

Currently the supported media types for Windows are ones that will run in MediaPlayer, and the supported media types for Mac are ones that will run in QuickTime. Two common media types between Windos and Mac are MPEG and MP2. Also, you may be aware that at JavaOne support for the ON2 media type was announced, which will be more universal. At the present moment, video and audio works on Windows, and audio works on Mac, with video hopefully close on its heels.
-Jim Weaver

Jim Weaver

John wrote: "Will you create an updated source of the examples of the book that run with the latest JFX update?"

That's a great idea, John. The JavaFX SDK Technology Preview seems to be settling down enough to make this worth the effort, so please watch this blog for a posts entitled "Updated JavaFX Script Book Example: [Example Name]"

Jim Weaver

Geekycoder wrote: "The modulus (remainder) has been changed from % to mod. I wonder why they change it to mod when % is currently in use."

I think that the rationale was to follow the pattern that was set with "not", "and", && "or" (rather than "!", "&&", "||". The target audience for JavaFX is designers && developers, so the thinking is that mod is easier to remember than %. || I could be wrong about this, ! that I haven't been wrong before.

- Jim Weaver

John

Hi James,

I started with the examples in your nice book. However, I see that many things have changed in JFX since then. E.g. javafx.ui.* classes have been replaced by javafx.ext.swing.* classes? And of course many examples do not run. Will you create an updated source of the examples of the book that run with the latest JFX update?

Thanks

John.

geekycoder

Wow, thank for the information.

"The modulus (remainder) has been changed from % to mod."
I wonder why they change it to mod when % is currently in use.

Coffeejolts

Well, I figured out part of the problem: my URI was malformed. Now, I am getting

com.sun.media.jmc.MediaUnsupportedException: Unsupported media: file:/C:/test1.mp3

Coffeejolts

James,

I am still having trouble getting the media support to work. Using the pasted code and the tp1 sdk, I get the following exception.
FX Media Object caught Exception com.sun.media.jmc.MediaUnavailableException: Media unavailable: C:/test1.mp3

The file is there and should be playable. I am no longer getting the unable to load jmc library exception, though, which is an improvement.

Frame{
width: 200
height: 200
content:[
MediaView{
mediaPlayer: MediaPlayer{
media: Media{
source: "C:/test1.mp3"
}
autoPlay: true
}
}
]
visible: true
}

magomarcelo

now, If only I could find a supported media type for a MediaPlayer demo on my Mac I would be happy!

Jim Weaver

The Technology Preview has the Frame, Dialog and Window classes in both packages. You can download the Technology Preview at the following URL:
http://openjfx.java.sun.com/hudson/job/openjfx-compiler-technology-preview/lastSuccessfulBuild/artifact//*zip*/archive.zip

Scott Hommel

Thanks for posting this but according to the API, Frame Window and Dialog are now in javafx.ext.swing not javafx.application.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

About/Contact


  • About this blog, and
    how to contact me

JavaFXpert RIA Exemplar Challenge - Win 2000 USD!


  • Create an application in JavaFX that exemplifies the appearance and behavior of a next-generation enterprise RIA (rich internet application).
    Are you up to the challenge?

Upcoming Speaking Engagements:

Pro JavaFX 1.2 Book


  • Written by Jim Weaver, Weiqi Gao, Stephen Chin, and Dean Iverson as a definitive guide to JavaFX and for temporary relief from insomnia. ;-)

Stay up to speed

Upcoming JavaFX Training:

Enter your email address:

Delivered by FeedBurner

Twitter Updates

    follow me on Twitter

    Affiliations:

    December 2009

    Sun Mon Tue Wed Thu Fri Sat
        1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30 31    

    Disclaimer:

    • By reading this site, you are agreeing that under no circumstances will Veriana Networks, Inc. or its affiliates be responsible for (1) any information contained on or omitted from the site, (2) any person's reliance on any such information, whether or not the information is correct, current or complete, (3) the consequences of any action you or any other person takes or fails to take, whether or not based on information provided by or as a result of the use of the sites.