i am using an array of JButtons b[23]....
my objective is that when i click a button it has to change its background color to black
but it is giving a nullpointer exception....
if(ae.getActionCommand().equals("0"))
{
System.out.println("button b[o] is pressed");
b[0].setBackground(Color.black);
}
}
can anyone help me with this please........