« Simon Says: Read this JavaFX Book as it's Being Written | Main | Danny Coward: These are a Few of My Favorite [JavaFX SDK Preview] Things »

August 17, 2008

TrackBack

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

Listed below are links to weblogs that reference TableNode: Creating a Custom Scrollable Table in JavaFX:

Comments

Mykola Golubyev

Hi, I'd been hitting your blog through google during all my last JavaFX searches. You wrote nice posts. I just wonder why you call variable like 'temp'? I suppose all our local variables are temp. What's the point? If you can't name a thing -- throw it out.

Jim Weaver

"Your weblog is really good but, like Shahid, I can't get the code to compile, much less execute.

I've got a fairly large Java Swing client application that uses JDBC to connect to a remote database. It needs to be "jazzed up" and I think JavaFX is the answer. I certainly haven't found anything else (Flex/Air may not be present on various desktops; LOBO and Cobra don't render HTML very well and other "solutions" are platform-specific [i.e., Windows]).

But I'm kind of frustrated that there is so little documentation available for the FX platform. Without doing much digging I understood that the language syntax must have changed since you first built these components. Do you have plans to update. And why, oh why, didn't Sun implement some common widgets like tabbed panes and tables (even if the ones offered were only very generic)? I want to build something flashy like the Tesla example, but I don't see the source for that either.

(Have your JavaFX Script book and eagerly awaiting your new one). Thanks!"

Steve,
The new book is coming along well and is due to be published before JavaOne 2009. Regarding the TableNode code, I am in the process of migrating the code for the JFX Custom Node series in this blog to JavaFX SDK 1.0. By the way, Stephen Chin (a co-author of the new JavaFX book) has created a JavaFX SDK 1.0 cheat sheet for migrating from Technical Preview. See the following blog post:
http://javafxpert.com/weblog/2008/12/migrating-from-javafx-tech-preview-to-sdk-10.html

Regarding Sun implementing common widgets, I think that they will do that in future releases, but I'd like to see some community efforts to that end as well. Here's a link to one that is just starting up:
http://code.google.com/p/jfxtras/

Thanks,
Jim Weaver

Jim Weaver

"I tried your tableNode program on NetBeans ID 6.5. However, I couldn't run it. Initially there were so many exception that I realised because of some syntax has been changed in new version. Even after doing so many changes, I am not able to run this program. Can you help me James ???"

I am currently modifying the the code to JavaFX SDK 1.0 and will post the code soon.

Thanks,
Jim Weaver

Steve

James,
Your weblog is really good but, like Shahid, I can't get the code to compile, much less execute.

I've got a fairly large Java Swing client application that uses JDBC to connect to a remote database. It needs to be "jazzed up" and I think JavaFX is the answer. I certainly haven't found anything else (Flex/Air may not be present on various desktops; LOBO and Cobra don't render HTML very well and other "solutions" are platform-specific [i.e., Windows]).

But I'm kind of frustrated that there is so little documentation available for the FX platform. Without doing much digging I understood that the language syntax must have changed since you first built these components. Do you have plans to update. And why, oh why, didn't Sun implement some common widgets like tabbed panes and tables (even if the ones offered were only very generic)? I want to build something flashy like the Tesla example, but I don't see the source for that either.

(Have your JavaFX Script book and eagerly awaiting your new one). Thanks!

Shahid

Hi James..

I tried your tableNode program on NetBeans ID 6.5. However, I couldn't run it. Initially there were so many exception that I realised because of some syntax has been changed in new version. Even after doing so many changes, I am not able to run this program. Can you help me James ???

complete scrollable table

This blog has information about implementing scrollable table for normal table. The table will have fixed header, fixed footer, fixed left and fixed right column.

Lars

Hi Jim,

i played around a little bit with your TableNode example. Good work!

When i changed the playlistObjects, e.g. by adding elements with "insert into" in TableNodeExampleModel class no changes were commited to the UI. Is the binding working correct?

Thanks
Lars

Jim Weaver

"Am a Adobe Flex developer,new to Javafx.
I went through ur blogs,simply superb.
Are these applications which r developed in Javafx are only static?
If not how can we connect to the backend?
Can u suggest me any book or url for Javafx."

Pratap,
Thanks for your kind words! Because JavaFX compiles to Java bytecode it can use Java classes, so you can use *any* means that you want to in order to communicate with the back end! For example, you could use java.net.URL to do GETs and POSTs. Look for future versions of JavaFX to have convenience classes for this purpose (such as JSON, XML and web services libraries).

Thanks,
Jim Weaver

Pratap chowdary Vundavalli

Hi Jim,

Am a Adobe Flex developer,new to Javafx.
I went through ur blogs,simply superb.
Are these applications which r developed in Javafx are only static?
If not how can we connect to the backend?
Can u suggest me any book or url for Javafx.

Thank You,
Pratap.

Jim Weaver

deans4j,

The mouse scroll wheel is now supported. Thanks for your suggestion! I've updated the Java Web Start example so you can try it out. Take a look at the end of the TableNode.fx listing and you'll see the code that was added to handle the mouse scroll wheel:

onMouseWheelMoved: function(e:MouseEvent):Void {
var tempY = thumbEndY + e.getWheelRotation() * 4;
// Keep the scroll thumb within the bounds of the scrollbar
if (tempY >=0 and tempY + thumb.getHeight() <= track.getHeight()) {
thumbEndY = tempY;
}
else if (tempY < 0) {
thumbEndY = 0;
}
else {
thumbEndY = track.getHeight() - thumb.getHeight();
}
}

Thanks again,
Jim Weaver

Jim Weaver

deans4j wrote: "should this functionality suppose to be built in by default"?

Since this is a custom node that I built without any of the Swing components, it is my responsibility to put mouse wheel, and keyboard, support in it. I'll plan on doing that right away.
Thanks for your suggestion,
Jim Weaver

deans4j

Great example!

The Table looks nice but the scrollbar is not sync when I scroll around with my mouse scroll wheel. I'm pretty sure you can fix it, but the question is,for the sake of usability(ness) , should this functionality suppose to be built in by default?

grant

good example, I've just been working with the ScrollPane which works pretty well (developing an image viewer).

It would be nice if HBox and VBox had a scrollable option

Jim Weaver

Jan,

You're too kind! By the way, what kind of custom nodes would you like to see in the near future? For example, I'm contemplating creating a "Wizard" custom node that has the capability of easily articulating and controlling flow. Other thoughts?

Thanks again,
Jim Weaver

Jan

As always. Great example.
As always. Jim Weaver's blog is the best.
Real applications, this is exactly the kind of examples we need.
Thank you.

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.