Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Showing DatePicker in TableColumn

77d35709-3eb9-4c38-8184-1132984b6dc2Jul 19 2017 — edited Jul 26 2017

I've been struggling to find a good example of how to display a DatePicker in a JavaFX TableColumn. I've found *some* examples but explanations for how they worked were either very unclear or not present in the first place. Can anyone point me to a *good* example that is actually explained? I'm especially puzzled by the strange way the CellFactory is created with its Callback method.

Or would it be better for me to provide a specific example, then have someone walk me through it and explain just what is going on?

I have a relatively simple app that I am using to enter 4 values into a database table for each ticket order I take (this is for a pocket-money job that I am doing): the date (Y-M-D) the order was placed, the order number, the venue of the performance (which is a small, fixed list of places) and the number of tickets. I am already creating new orders successfully by having a separate part of the screen where the user (me) selects the date from a DateChooser, types the order number, selects the venue from the ChoiceBox, and types the number of tickets in the order and presses an Add button. But I'd like to move that functionality to the TableView itself so that the user simply clicks in the Order Date column of the TableView to activate the DatePicker or clicks on the Venue column to get the short list of Venues. Then, I could get rid of the part of the dialog that I am using specifically for Adds.

Can anyone advise me?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2017
Added on Jul 19 2017
2 comments
1,203 views