java - save JTable column data -
i'm passing values selected values 1 table selected row of other.
int tablerow = table.getselectedrow(); int tablecolumn = table.getselectedcolumn(); int table_1row = table_1.getselectedrow(); int table_1column = table_1.getselectedcolumn(); int table_2row = table_2.getselectedrow(); int table_2column = table_2.getselectedcolumn(); if(tablerow > -1 && tablecolumn > -1){ object obj = table.getvalueat(tablerow, tablecolumn); jtable.setvalueat(obj, post, 4); } else if (table_1row > -1 && table_1column > -1){ object obj1 = table_1.getvalueat(table_1row, table_1column); jtable.setvalueat(obj1, post, 4); } else if (table_2row > -1 && table_2column > -1){ object obj2 = table_2.getvalueat(table_2row, table_2column); jtable.setvalueat(obj2, post, 4);
what want save values @ column 4 of second table.
int tablerow = table.getselectedrow(); object obj = panel.gettable().getmodel().getvalueat(tablerow, 4); panelentity.settype((string) obj);
i save value of selected row.
Comments
Post a Comment