0

I have a form on which I want to access a date from the database and show in jDateChooser for a particular record. How do I get the date from the database table and how do I set that date in jDateChooser? The datatype on my database is date.

 JDateChooser.setText(a.getValueAt(selectedRowIndex, 5).toString());

this is my code and it produces error.

mkltsss
  • 3
  • 5

1 Answers1

0

First what is "a"? For the looks It seems to be a Table(?)

By JDateChooser you mean the netbeans plugin? or the JDateChooser from Toedter? or anything else?

You really should provide a mcve

If you have a JDateChooser from Toedter then you can use something like

JDateChooser.setDate(<Date_from_DB>)

With this little info I can't help you more

Community
  • 1
  • 1
liponcio
  • 264
  • 1
  • 9
  • a is the DefaultTableModel. The thing that I want to happen is that, when i clicked a row in a JTable, the date in that row will be displayed in the JDateChooser. And yes, it is from Toedter. – mkltsss Mar 22 '17 at 12:51