hallo gyus i have a problem
i create a table, and populate its data through the pojo,now this i am select one row and this data will be display in another panel , then i write a class which will
implement ListSelectionLi stener,i am just showing you the code sample, this is an inner class
class AddaxFMSBodySel ectionListener implements ListSelectionLi stener {
int[] selRows;
Object value;
public void valueChanged(Li stSelectionEven t listSelectionEv ent) {
boolean adjust = listSelectionEv ent.getValueIsA djusting();
if (!adjust) {
selRows = table.getSelect edRows();
int selections[] = table.getSelect edRows();
int selectedValues[] = table.getSelect edColumns();
// value = table.getValueA t(selRows[0], i);
if (selRows.length > 0) {
for (int i = 0; i < 4; i++) {
// get Table data
TableModel model = table.getModel( );
value = model.getValueA t(selRows[0], i);
/*Here i am finding the single row value*/
/**
String name = AddaxFMSDataIte m.class.cast(va lue).getName();
**/
//but when i try to find out only single value of the cell then i will got stuck
System.out.prin tln("Selection : " + value);
}
System.out.prin tln();
}
If any body got any idea then help me.
i create a table, and populate its data through the pojo,now this i am select one row and this data will be display in another panel , then i write a class which will
implement ListSelectionLi stener,i am just showing you the code sample, this is an inner class
class AddaxFMSBodySel ectionListener implements ListSelectionLi stener {
int[] selRows;
Object value;
public void valueChanged(Li stSelectionEven t listSelectionEv ent) {
boolean adjust = listSelectionEv ent.getValueIsA djusting();
if (!adjust) {
selRows = table.getSelect edRows();
int selections[] = table.getSelect edRows();
int selectedValues[] = table.getSelect edColumns();
// value = table.getValueA t(selRows[0], i);
if (selRows.length > 0) {
for (int i = 0; i < 4; i++) {
// get Table data
TableModel model = table.getModel( );
value = model.getValueA t(selRows[0], i);
/*Here i am finding the single row value*/
/**
String name = AddaxFMSDataIte m.class.cast(va lue).getName();
**/
//but when i try to find out only single value of the cell then i will got stuck
System.out.prin tln("Selection : " + value);
}
System.out.prin tln();
}
If any body got any idea then help me.
Comment