I need to choose a date from my datepicker and i need to submit that date to my database(mysql). Previously I have used textfield for the date and i got the the expected output. Now i need to use datePicker,How to use my datePicker to submit my selected date to the mysql database? Thanks in advance,any suggestions would be appreciable I have created my calendar by using this four lines:
UtilDateModel model1 = new UtilDateModel();
JDatePanelImpl datePanel = new JDatePanelImpl(model1);
JDatePickerImpl datePicker = new JDatePickerImpl(datePanel,new DateLabelFormatter());
datePicker.setBounds(130, 130, 180, 20);
Below is my query,that i have used date as a textfield:
theQuery("insert into Files5(FileName,LinesCount,UserId,Date,Time) values('"+JT_FileName.getText()+"','"+JT_LinesCount.getText()+"','"+JT_UserId1.getText()+"','"+JT_Date1.getText()+"','"+JT_Time1.getText()+"')");
Now how can i replace my JT_DATE1 with my datePicker