Hello
The table's cells contain integer values. I would like to save each one of theme them in an array of integers.
The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages.
I tried something like:
Object o = table.getModel().getValueAt(i, j);
a[x]=Integer.parseInt(o.toString());
When I made a test to make sure that the data are well stored.
JOptionPane.showMessageDialog(null, a[0]);
System.exit(0);
The IDE hangs.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Please help.
Thank you.