SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
Date date = sdf.parse(d);
Calendar cal = GregorianCalendar.getInstance();
cal.setTime(date);
for (i=0;x>i;i++){
cal.add(GregorianCalendar.DATE, 7);
String t = sdf.format(cal.getTime());
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
model.addRow(new Object[]{t,c});
}
kenneth_12
0
Newbie Poster
Recommended Answers
Jump to Postit boils down to this:
step 1a: learn to read data from a JTable (which is not an array, just so you know)
step 1b: write the code that does sostep 2a: learn to write data into a DB
step 2b: write the code that does sostep 3: …
All 3 Replies
rproffitt
2,580
"Nothing to see here."
Moderator
stultuske
1,116
Posting Maven
Featured Poster
Tarek_2
26
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.