• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDateChooser fulfill date by selected JComboBox item which is connected from database Sqlite

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone help me. I want the JDateChooser -dateChooserBrithIDCard to populate based on the selected item in a JcomboBox connected to a Sqlite database. The code shows an option for jtexfield, which works perfectly, like for example: txtnameIDCard.setText(rs.getString("Firstname"));. While I used the following code: dateChooserBrithIDCard.setDate(rs.getDate("DateOfBrith")); for JDateChooser but it doesn't work. It shows me the following error:"""" java.sql.SQLException: Error parsing time stamp""""", can anyone advise me the right code how to make this thing work?

JDateChooser.jpg
[Thumbnail for JDateChooser.jpg]
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Where does this date chooser come from?
Why are you using a date chooser when you can download the date of birth directly from a database?
Please use the code button. I have used it on your code, and doesn't it look better. Don't mix tabs and spaces; use spaces for indentation. Don't use coloured text inside code tags; it doesn't work, so I changed it all to the default colours.
 
Tom Bony
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
#Campbell Ritchie

Thank you for the wonderful welcome message

"Where does this date chooser come from?"

DateChooser is a JavaBeans library for date selection.It contains 3 datepicker components: the panel, combo editor and a dialog window. All components support visual property customization without any IDE.

Why are you using a date chooser when you can download the date of birth directly from a database?

Because I want to use JDateChooser, better visual effetcts when choosing a date.

Thanks for the advice and corrections on my first post




 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


First of all: have you confirmed that those lines of code are actually executed?

And do your specifications really require you to use "Brith" for what to me appears to be "Birth"? Sorry, I find that so distracting that I have trouble looking at your code.
 
Tom Bony
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your message Mr. Paul

First of all: have you confirmed that those lines of code are actually executed? Those line are not executed, I get this error:
java.sql.SQLException: Error parsing time stamp

I find that so distracting that I have trouble looking at your code! I`m really sorry that my code is distracting you. Please just try to understand that some of us here are pretty new on using java code. Wish a great day ahead
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the information; the only date picker I have used is from Tödter, so I am not familiar with this one.
 
reply
    Bookmark Topic Watch Topic
  • New Topic