I am using receipt printer for my invoices, and Referring to the Post in which Mr. CLOUGH has answered and gave reference of WAGU library, I wrote all the code but where the code like
List<List<String>> t2Rows = Arrays.asList(
Arrays.asList("Optical mouse", "120.00", "20", "2400.00"),
Arrays.asList("Gaming keyboard", "550.00", "30", "16500.00"),
Arrays.asList("320GB SATA HDD", "220.00", "32", "7040.00"),
Arrays.asList("500GB SATA HDD", "274.00", "13", "3562.00"),
Arrays.asList("1TB SATA HDD", "437.00", "11", "4807.00"),
Arrays.asList("RE-DVD ROM", "144.00", "29", "4176.00"),
Arrays.asList("DDR3 4GB RAM", "143.00", "13", "1859.00"),
Arrays.asList("Blu-ray DVD", "94.00", "28", "2632.00"),
Arrays.asList("WR-DVD", "122.00", "34", "4148.00"),
Arrays.asList("Adapter", "543.00", "28", "15204.00")
);
in above code values are given as string and fixed, but I have to add these values from my jTable
.
wherever I get values from jTable
with following code
for (int i = 0; i < tbl_sale.getRowCount(); i++) {
String pid = tbl_sale.getValueAt(i, 0).toString();
String item = tbl_sale.getValueAt(i, 1).toString();
String quant = tbl_sale.getValueAt(i, 2).toString();
String rate = tbl_sale.getValueAt(i, 3).toString();
String rs = tbl_sale.getValueAt(i, 4).toString();
}
but now the problem is I am unable to insert these values in list Array.asList. Can Anyone help me through this problem.
Thanks