I have a list of JLabel
s and when I go to define the first element on the second line, I am getting the NullPointerException
error. Why is this?
JLabel[] labels = new JLabel[16];
labels[0].setText("| Dataset |");
I have looked at other posts relating to this error, but I can't seem to find how they relate to this situation.