title: trouble in overriding JFrame.setBackground()
body: <p>I have a class called MainUI that extends JFrame, it has this code :</p>
  
  <pre><code>//Constructor
  public MainUI(){
  
  // components/panels are already defined and initialized here.
  
  setBackground(Color.decode("#EFF4E4"));
  }
  
  @Override
  public void setBackground(Color colorbg){ //a method to set the same background color for all the components I ave
  
  getContentPane().setBackground(colorbg);
  
  decisionPanel.setBackground(colorbg);
  
  adbRadio.setBackground(colorbg);
  fastbootRadio.setBackground(colorbg);
  commandRadio.setBackground(colorbg);
  
  pushPanel.setBackground(colorbg);
  uninstallPanel.setBackground(colorbg);
  pcPanel.setBackground(colorbg);
  phonePanel.setBackground(colorbg);
  }
  </code></pre>
  
  <p>however, when I compile, it gives a NullPointerException at the line [ decisionPanel.setBackground(colorbg); ]</p>
  
  <p>I tried not overriding the setBackground method and renamed it and the code worked fine, I don't know why overriding setBackground method causes a problem?</p>
  
  <p><strong>I'm sure all the panels/components are initialized before the call to the method, it's obvious since the code did work just ater I've renamed the method.</strong></p>