I making a JTable and i want a list of String is inserted in a single column in the JTable when a button is clicked.
will this be possible with this type of data:
String datelist = format.format(cal2.getTime()));
List<String> wordList = Arrays.asList(datelist);
System.out.println(wordList);
The output will be like this:
[2013-05-10]
[2013-05-11]
[2013-05-12]
[2013-05-13]
[2013-05-14]
[2013-05-15]
[2013-05-16]
[2013-05-17]
[2013-05-18]
[2013-05-19]
[2013-05-20]
I'm using DefatulTableModel:
table_4 = new JTable (new DefaultTableModel(
new Object[][] {
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
{"", "", "", "", "", "", "", "", "", "", "", ""},
},
new String[] {
"", "", "", "", "", "", "", "", "", "", "", ""