I want to create payslip in java
public Vector createData()
{
Vector result = new Vector();
Vector rec = new Vector();
Object[] value = new Object[] {"Employee Name",ename.getSelectedItem().toString()};
rec.add(value);
value = new Object[] {"Mary-Kate Olsen", "Ashley Olsen"};
rec.add(value);
result.add(rec);
rec = new Vector();
value = new Object[] {"Charlie Read", "Craig Read"};
rec.add(value);
value = new Object[] {"Tegan Quin", "Sara Quin"};
rec.add(value);
result.add(rec);
return result;
}
I have exception in this line
Object[] value = new Object[] {"Employee Name",f.ename.getSelectedItem()};
It cant display the employee name. The employee name changed at any time. Its depend upon the user selection. But exception thrown. Please help me.