I have a 3x3 array of MSTextField
which is a class I created which extends JTextField
. I'm trying to set all of the text fields to display the empty string ( ""
). My problem is I'm getting a nullPointerException at the end of the method which is supposed to do this. I think the problem might be that I haven't initialized the array yet (earlier I thought that I was doing this by setting each text field to ""
but I think I was wrong). How do I initialize an array of MSTextField
so that I can set the text? Also, once they're initialized will textFieldArray[row][column].setText( "" );
at the end of my for loops work?
SMITA6076 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.