JFormattedTextField array
Hi all,
I have this piece of code that runs into a runtime exception error when trying to access an element of its array.
code snippet
.....
boolean booln =true;
private JFormattedTextField [] formFields ={farm_noFld, block_noFld........};
for (int i = 0; i < formFields.length; i++)
{
System.out.println("length: " + formFields.length);
System.out.println("index[0] : " + formFields);
formFields[i].setEnabled(booln);
}
.....
Output from the program..
length: 27
index[0] : null
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
The array is created and has a size of 27 objects but I cant seen to access them...Can anyone help?

