Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Agathed

By: a guest on Oct 23rd, 2008  |  syntax: Java  |  size: 0.52 KB  |  hits: 72  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //In this case I have the icon and no Null Pointer Exception
  2. final JColorChooser locColorChooser = new JColorChooser();
  3. locColorChooser.addChooserPanel(new EyeDropperColorChooserPanel());
  4.  
  5. //But if I create a new class inheriting from EyeDropperColorChooserPanel I got the null pointer exception
  6.  
  7. private class EyeDropper extends EyeDropperColorChooserPanel{
  8.     public EyeDropper()
  9.     {
  10.       super();
  11.     }
  12.   }
  13. final JColorChooser locColorChooser = new JColorChooser();
  14. locColorChooser.addChooserPanel(new EyeDropper());