View Single Post
  #2 (permalink)  
Old May 28th, 2007, 07:15 AM
iamrakesh22 iamrakesh22 is offline
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,
the setBackground() method doesnt return anything its return type is void. When you call component.setBackground() then the background of that component gets changed you dont have to reassign it to some other variable.
Try changing the line
numberArea[x] = numberArea[start & start++].setBackground(Color.magenta);
to
numberArea[start & start++].setBackground(Color.magenta);

Regards,
Rakesh
Reply With Quote