Thanks KevinWorkman!!
Yes as I checked the b[0] is null. But why?? I create the buttons
" JButton b[] = new JButton[numberOfButtons];
b[i] = new JButton();
b[i].setEnabled(true);
...
Type: Posts; User: kathaki88
Thanks KevinWorkman!!
Yes as I checked the b[0] is null. But why?? I create the buttons
" JButton b[] = new JButton[numberOfButtons];
b[i] = new JButton();
b[i].setEnabled(true);
...
this the error : Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
in this line : jPanel1.add(b[0]);
the line in blue
start is a button and bellow is it's actionPerformed...
in this line is the error :jPanel1.add(b[0]);
i want to put a button into jPanel1 ...when I use it outside the for there is no problem
Somehow there is a problem in the for loop
I get this Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
when i click the button Start, below is it's handler
Can't understand why...Please help me!!!!!!!!!!!!!!!!!
...