SHARE
TWEET

Agathed

a guest Oct 23rd, 2008 72 Never
  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());
RAW Paste Data
Top